Skip to content

Commit

Permalink
DomkitEditor: fix domkit editor panel resize when hide isn't full screen
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoVgr committed Jan 31, 2025
1 parent 47e915c commit b9ea44d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions hide/view/Domkit.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class Domkit extends FileView {
var prevSave : { css : String, dml : String, params : String };
var checker : hide.comp.DomkitEditor.DomkitChecker;

var totalHeight = 0.;
var totalWidth = 0.;
override function onDisplay() {

element.html('
Expand Down Expand Up @@ -46,8 +48,8 @@ class Domkit extends FileView {
cssEditor.onSave = dmlEditor.onSave = paramsEditor.onSave = save;

var editors = element.find('.editors');
var totalWidth = editors.width();
var totalHeight = editors.height();
totalWidth = editors.width();
totalHeight = editors.height();
var panelRight = element.find('.right');
var panelLeft = new hide.comp.ResizablePanel(hide.comp.ResizablePanel.LayoutDirection.Horizontal, element.find('.left'), After);
panelLeft.onBeforeResize = () -> {
Expand Down Expand Up @@ -76,6 +78,12 @@ class Domkit extends FileView {
new hide.comp.Scene(config, scene, scene).onReady = function() check();
}

override function onResize() {
var editors = element.find('.editors');
totalWidth = editors.width();
totalHeight = editors.height();
}

function defineGlobals() {
// define DomkitBaseContext functions
@:privateAccess paramsEditor.checker.init();
Expand Down

0 comments on commit b9ea44d

Please sign in to comment.