Skip to content

Commit

Permalink
Fix Script
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausSchaefers committed Jan 28, 2025
1 parent 60c6f73 commit 37a506e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/canvas/toolbar/components/DataSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1537,10 +1537,12 @@ export default {
this.canvas.setState(0);
}));
d.onOpen(() => {
settings.placeAt(cntr);
settings.setHash(this.hash);
settings.setWidget(this.widget);
settings.setModel(this.model);
})
if (e && e.target) {
d.popup(popup, e.target);
Expand Down
5 changes: 4 additions & 1 deletion src/canvas/toolbar/dialogs/ScriptEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ return "myScreen"
enableSnippets: false,
enableLiveAutocompletion: false
});
editor.setAutoScrollEditorIntoView(true);
setTimeout(()=> {
editor.focus()
Expand Down Expand Up @@ -200,12 +201,14 @@ return "myScreen"
pos.w -=30;
pos.h = domPos.h;
console.debug("ScriptEditor.renderSimulator", pos, domPos);
const container = db.div("MatchSimulatorContainer MatcAnimationComposerSimulator")
.h(pos.h)
.w(pos.w)
.build();
const scroller = this.$new(ScrollContainer, {canDestroy:true});
const scroller = this.$new(ScrollContainer, {canDestroy:true, mustDestroy:true});
scroller.placeAt(container);
const s = this.$new(Simulator, {mode : "debug", logData : false, runTimerLinesOnScreenLoad : false, isDesktopTest:true, isWiringEvents:true});
Expand Down
2 changes: 1 addition & 1 deletion src/common/ScrollContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default {
methods: {
wrap (node, offset) {
if (!this.debug) {
if (has("android") || has("ios") || has("mac")) {
if (has("android") || has("ios") || has("mac") || this.mustDestroy) {
/**
* The default behavior for *cool* OSes is to remove and use native scrolling.
* However the stupid simulator has a bug, so we have to trick a litte to make the native work
Expand Down
12 changes: 12 additions & 0 deletions src/style/toolbar/script.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,22 @@
height: 540px;
width: 940px;

.ace-editor {
width: 100%;
height: 100%;
}

.ace-holder {
width: 100%;
height: 100%;
}

.ace_editor,
.MatcScriptEditorConsole {
border: 1px solid #ccc;
overflow: auto;
width: 100%;
height: 100%;
}

.MatcScriptColumns {
Expand Down

0 comments on commit 37a506e

Please sign in to comment.