0

いくつかのモーダル ポップアップを実行していますが、ダイアログは左側に 200 ピクセル、本来あるべき場所の上部に約 100 ピクセルをレンダリングします。

更新されたjquery

DevicesRightClickActionsMenuController.prototype.showActionsMenu = function(event) {
    rightClicActionskMenuElement.css({
        top : $('.printer-context-node').offset().top + $('.printer-context-node').height() - $('.devices-right-click-menu-item').height() * 4 + 'px',
        left : $('.printer-context-node').offset().left + $('.printer-context-node').width() + 'px',
        position : 'absolute',
        zIndex : 1000
    });

DevicesRightClickMenuController.prototype.showRightClickMenu = function (xPosition, yPosition, theSerialNumber) {

serialNumber = theSerialNumber;

rightClickMenuElement.css({
    position: 'absolute',
    top: yPosition,
    left: xPosition,
    zIndex: 1000,
});
4

1 に答える 1

0

pageX/pageYではなくclientX/など、イベントの間違ったプロパティを使用してボックスを表示している可能性がありますclientY。さらにコードを投稿すると、これを絞り込むのに役立ちます。

于 2013-04-02T14:49:48.533 に答える