Skip to content

Commit 0863eb3

Browse files
author
minjk-bl
committed
Fixed inner popup draggable
1 parent 400e328 commit 0863eb3

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

css/popupComponent.css

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,12 @@
346346
/* inner popup */
347347
.vp-inner-popup-box {
348348
position: absolute;
349-
left: 50%;
350-
top: 50%;
351-
transform: translate(-50%, -50%);
349+
left: calc(50% - 200px);
350+
top: calc(50% - 150px);
352351
min-width: 400px;
353352
min-height: 150px;
354353
width: 30%;
355-
height: fit-content;
354+
height: 300px;
356355
background-color: white;
357356
z-index: 200;
358357
border: 0.25px solid var(--border-gray-color);

js/com/component/PopupComponent.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,12 @@ define([
394394
});
395395
}
396396
});
397+
398+
// inner popup draggable
399+
$(this.wrapSelector('.vp-inner-popup-box')).draggable({
400+
handle: '.vp-inner-popup-title',
401+
containment: 'parent'
402+
});
397403
}
398404

399405
_unbindResizable() {

js/m_apps/Frame.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,10 @@ define([
760760
return content.toString();
761761
}
762762

763-
openInputPopup = function(type, width=0, height=0) {
763+
openInputPopup = function(type, width=400, height=300) {
764764
var title = '';
765765
var content = '';
766+
let size = { width: width, height: height };
766767

767768
switch (parseInt(type)) {
768769
case FRAME_EDIT_TYPE.ADD_COL:
@@ -793,6 +794,9 @@ define([
793794

794795
this.state.popup.type = type;
795796

797+
// set size
798+
$(this.wrapSelector('.vp-inner-popup-box')).css(size);
799+
796800
// set content
797801
$(this.wrapSelector('.vp-inner-popup-body')).html(content);
798802

0 commit comments

Comments
 (0)