@@ 1472-1497 (lines=26) @@ | ||
1469 | this.zInd = this.zIndInit; |
|
1470 | } |
|
1471 | /****************************************************************************************************************************************************/ |
|
1472 | dhtmlXMenuObject.prototype._doOnContextBeforeCall = function(e, cZone) { |
|
1473 | this.contextMenuZoneId = cZone.id; |
|
1474 | this._clearAndHide(); |
|
1475 | this._hideContextMenu(); |
|
1476 | ||
1477 | // scroll settings |
|
1478 | var p = (e.srcElement||e.target); |
|
1479 | var px = (_isIE||_isOpera||_KHTMLrv?e.offsetX:e.layerX); |
|
1480 | var py = (_isIE||_isOpera||_KHTMLrv?e.offsetY:e.layerY); |
|
1481 | var mx = getAbsoluteLeft(p)+px; |
|
1482 | var my = getAbsoluteTop(p)+py; |
|
1483 | ||
1484 | if (this.checkEvent("onBeforeContextMenu")) { |
|
1485 | if (this.callEvent("onBeforeContextMenu", [cZone.id])) { |
|
1486 | if (this.contextAutoShow) { |
|
1487 | this._showContextMenu(mx, my); |
|
1488 | this.callEvent("onAfterContextMenu", [cZone.id]); |
|
1489 | } |
|
1490 | } |
|
1491 | } else { |
|
1492 | if (this.contextAutoShow) { |
|
1493 | this._showContextMenu(mx, my); |
|
1494 | this.callEvent("onAfterContextMenu", [cZone.id]); |
|
1495 | } |
|
1496 | } |
|
1497 | } |
|
1498 | /* public: user call for show/hide context menu */ |
|
1499 | /** |
|
1500 | * @desc: usercall to show a contextual menu |
@@ 1440-1465 (lines=26) @@ | ||
1437 | this.zInd = this.zIndInit; |
|
1438 | } |
|
1439 | /****************************************************************************************************************************************************/ |
|
1440 | dhtmlXMenuObject.prototype._doOnContextBeforeCall = function(e, cZone) { |
|
1441 | this.contextMenuZoneId = cZone.id; |
|
1442 | this._clearAndHide(); |
|
1443 | this._hideContextMenu(); |
|
1444 | ||
1445 | // scroll settings |
|
1446 | var p = (e.srcElement||e.target); |
|
1447 | var px = (_isIE||_isOpera||_KHTMLrv?e.offsetX:e.layerX); |
|
1448 | var py = (_isIE||_isOpera||_KHTMLrv?e.offsetY:e.layerY); |
|
1449 | var mx = getAbsoluteLeft(p)+px; |
|
1450 | var my = getAbsoluteTop(p)+py; |
|
1451 | ||
1452 | if (this.checkEvent("onBeforeContextMenu")) { |
|
1453 | if (this.callEvent("onBeforeContextMenu", [cZone.id,e])) { |
|
1454 | if (this.contextAutoShow) { |
|
1455 | this._showContextMenu(mx, my, cZone.id); |
|
1456 | this.callEvent("onAfterContextMenu", [cZone.id,e]); |
|
1457 | } |
|
1458 | } |
|
1459 | } else { |
|
1460 | if (this.contextAutoShow) { |
|
1461 | this._showContextMenu(mx, my, cZone.id); |
|
1462 | this.callEvent("onAfterContextMenu", [cZone.id]); |
|
1463 | } |
|
1464 | } |
|
1465 | } |
|
1466 | /* public: user call for show/hide context menu */ |
|
1467 | /** |
|
1468 | * @desc: usercall to show a contextual menu |