sunrize 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Editors/Panel.js +13 -9
package/package.json
CHANGED
package/src/Editors/Panel.js
CHANGED
|
@@ -132,7 +132,7 @@ module .exports = new class Panel extends Interface
|
|
|
132
132
|
// Move panel in view if top, left, bottom or right is outside of window.
|
|
133
133
|
|
|
134
134
|
const
|
|
135
|
-
offset = this .container .offset (),
|
|
135
|
+
offset = this .container .parent () .offset (),
|
|
136
136
|
width = this .container .width (),
|
|
137
137
|
height = this .container .height (),
|
|
138
138
|
body = $("body");
|
|
@@ -141,17 +141,21 @@ module .exports = new class Panel extends Interface
|
|
|
141
141
|
right = parseFloat (this .container .css ("right")) || 0,
|
|
142
142
|
bottom = parseFloat (this .container .css ("bottom")) || 0;
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
const
|
|
145
|
+
left = this .container .parent () .width () - right - width + offset .left,
|
|
146
|
+
top = this .container .parent () .height () - bottom - height + offset .top;
|
|
147
|
+
|
|
148
|
+
if (left + width > body .width ())
|
|
149
|
+
right += (left + width) - body .width () + 8;
|
|
146
150
|
|
|
147
|
-
if (
|
|
148
|
-
right +=
|
|
151
|
+
if (left < 0)
|
|
152
|
+
right += left - 8;
|
|
149
153
|
|
|
150
|
-
if (
|
|
151
|
-
bottom += (
|
|
154
|
+
if (top + height > body .height ())
|
|
155
|
+
bottom += (top + height) - body .height () + 8;
|
|
152
156
|
|
|
153
|
-
if (
|
|
154
|
-
bottom +=
|
|
157
|
+
if (top < 0)
|
|
158
|
+
bottom += top - 8;
|
|
155
159
|
|
|
156
160
|
this .container .css ({
|
|
157
161
|
"right": `${right}px`,
|