[feature] add default layout width control

This commit is contained in:
zombieFox 2019-11-27 17:07:18 +00:00
parent 4e982fe07a
commit 5737518a11
2 changed files with 20 additions and 0 deletions

View File

@ -150,6 +150,9 @@
<div class="control-layout-width-count form-group-text form-group-medium form-group-radius-left"></div>
</div>
</div>
<div class="button-wrap">
<button class="control-layout-width-default button mb-0" tabindex="1">Default Width</button>
</div>
<hr>
<label class="control-layout-alignment-label">Area alignment</label>
<div class="form-grid-wrap">

View File

@ -139,6 +139,23 @@ var control = (function() {
layout.render.width();
render.range.count(this);
}
}, {
element: helper.e(".control-layout-width-default"),
type: "button",
additionalEvents: [{
event: "click",
func: function() {
edge.box.open({
element: helper.e(".layout"),
delay: 500
});
}
}],
func: function() {
mod.setValue("layout.width", 80);
layout.render.width();
render.update();
}
}, {
element: helper.e(".control-layout-alignment-topleft"),
path: "layout.alignment",