Skip to content

Commit 1b186ae

Browse files
author
hikki
committed
v4.7
1 parent 70e950c commit 1b186ae

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

resources/assets/component.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ window._component = {
118118
let w, h;
119119
div.className = 'dlp-alert';
120120
this._alert_documents.forEach((D)=>{
121-
D.style.top = parseInt(D.style.top) - 60 + 'px';
121+
D.style.top = parseInt(D.style.top) - 60 + 'px';
122122
});
123123
this._alert_documents.push(div);
124124
if (!dom) {
@@ -1305,12 +1305,14 @@ window.ComponentPlane = class {
13051305
makeModal() {
13061306
let width = this.OPTIONS.w;
13071307
if (this.OPTIONS.w.toString().indexOf('px') === -1 && this.OPTIONS.w.toString().indexOf('%') === -1) {
1308-
width = window.innerWidth * this.OPTIONS.w - 18;
1308+
width = window.innerWidth * this.OPTIONS.w;
1309+
if(width>= (window.innerWidth - 18)) width = window.innerWidth - 18;
13091310
width += 'px';
13101311
}
13111312
let height = this.OPTIONS.h;
13121313
if (this.OPTIONS.h.toString().indexOf('px') === -1 && this.OPTIONS.h.toString().indexOf('%') === -1) {
1313-
height = window.innerHeight * this.OPTIONS.h - 25;
1314+
height = window.innerHeight * this.OPTIONS.h;
1315+
if(height>= (window.innerHeight - 25)) height = window.innerHeight - 25;
13141316
height += 'px';
13151317
}
13161318
let margin = this.OPTIONS.top + ' ' + this.OPTIONS.left;
@@ -2485,4 +2487,4 @@ window.ComponentCascadeLine = class {
24852487
this.dimensional_data[stack].splice(d, 1);
24862488
});
24872489
}
2488-
};
2490+
};

0 commit comments

Comments
 (0)