Skip to content

Commit

Permalink
feat(layout): add controlOnLeft option
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya authored and kevinchappell committed Oct 18, 2024
1 parent 04b8bb7 commit bf5a455
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/demo/js/options/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const editorOptions = {
// debug: true,
sessionStorage: true,
editPanelOrder: ['attrs', 'options'],
// controlOnLeft: true,
}

export const renderOptions = {
Expand Down
5 changes: 5 additions & 0 deletions src/js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ export class FormeoEditor {
*/
render() {
this.stages = Object.values(Components.get('stages'))
if (this.opts.controlOnLeft) {
this.stages.forEach(stage => {
stage.dom.style.order = 1
})
}
const elemConfig = {
attrs: {
className: 'formeo formeo-editor',
Expand Down

0 comments on commit bf5a455

Please sign in to comment.