Skip to content

Commit 823fcd9

Browse files
committed
IE doens't tanfsorm hmm
1 parent c9155bf commit 823fcd9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Scripts/WindowManager.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ Object.defineProperty(Dialog.prototype, "x", {
231231
if (useTransform) {
232232

233233
this.target.style.transform = "translateX(" + leftPixels + ")" ;
234+
this.target.style.msTransform = "translateX(" + leftPixels + ")" ;
234235
this.target.style.left = "0px";
235236
}else
236237
this.target.style.left = leftPixels;
@@ -313,7 +314,10 @@ Dialog.prototype.getInnerRect = function () { return { top: this.target.offsetTo
313314
Dialog.prototype.getRect = function (index) { return index == null ? this.target.getBoundingClientRect() : this.target.getClientRects()[index]; }
314315
Dialog.prototype.getButton = function (index) { return this.head.getElementsByTagName("button")[index]; }
315316
Dialog.prototype.createOpenButton = function () { return this.buttons.unshift(document.createElement("button")), this.buttons[0].innerText = this.title, this.buttons[0].onclick = this.open.bind(this), this.buttons[0] }
316-
Dialog.prototype.setClickOffset = function (x, y) { return this.clickOffset.x = x, this.clickOffset.y = y, this.clickOffset.height = window.height || this.target.offsetHeight, this.clickOffset.width = window.width || this.target.offsetWidth, this.clickOffset.top = this.target.offsetTop, this.clickOffset.left = this.target.offsetLeft, this.clickOffset.stats.reset(); }
317+
Dialog.prototype.setClickOffset = function (x, y) {
318+
const rect = this.getRect();
319+
return this.clickOffset.x = x, this.clickOffset.y = y, this.clickOffset.height = window.height || rect.height, this.clickOffset.width = window.width || rect.width, this.clickOffset.top = rect.top, this.clickOffset.left = rect.left, this.clickOffset.stats.reset();
320+
}
317321
Dialog.prototype.verifyEjectCapability = function () { return function () { try { return this.frame.contentDialog.document || this.frame.contentDocument !== null; } catch (e) { return false } }(); }
318322
Dialog.prototype.togglePointerEvents = function (enable) {
319323
if (enable == null) enable = this.target.style.pointerEvents == "none";

0 commit comments

Comments
 (0)