From ca55699744ea85988e2167013b181eaf68a445d9 Mon Sep 17 00:00:00 2001 From: Yueyu Date: Thu, 22 Jul 2021 18:12:33 +0800 Subject: [PATCH 1/2] resort sprite, sprite outline, background, delete button zIndex --- src/editor/engine/Page.js | 3 ++- src/editor/engine/Sprite.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/editor/engine/Page.js b/src/editor/engine/Page.js index a51a17e..f644daa 100644 --- a/src/editor/engine/Page.js +++ b/src/editor/engine/Page.js @@ -28,7 +28,8 @@ export default class Page { this.sprites = JSON.stringify([]); this.bkg = newDiv(this.div, 0, 0, 480, 360, { position: 'absolute', - background: ScratchJr.stagecolor + background: ScratchJr.stagecolor, + zIndex: '-10', }); this.bkg.type = 'background'; ScratchJr.stage.pages.push(this); diff --git a/src/editor/engine/Sprite.js b/src/editor/engine/Sprite.js index 72c98c4..785b428 100755 --- a/src/editor/engine/Sprite.js +++ b/src/editor/engine/Sprite.js @@ -44,6 +44,7 @@ export default class Sprite { this.div = document.createElement('div'); setProps(this.div.style, { position: 'absolute', + zIndex: -1, left: '0px', top: '0px' }); @@ -464,6 +465,7 @@ export default class Sprite { this.div.appendChild(this.border); setProps(this.border.style, { position: 'absolute', + zIndex: -2, left: '0px', top: '0px' }); From a5e91730e0bdb30aa981ca284e5bda92bbb05590 Mon Sep 17 00:00:00 2001 From: Yueyu Date: Thu, 22 Jul 2021 18:17:27 +0800 Subject: [PATCH 2/2] code lint --- src/editor/engine/Page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/editor/engine/Page.js b/src/editor/engine/Page.js index f644daa..c6ab847 100644 --- a/src/editor/engine/Page.js +++ b/src/editor/engine/Page.js @@ -28,8 +28,8 @@ export default class Page { this.sprites = JSON.stringify([]); this.bkg = newDiv(this.div, 0, 0, 480, 360, { position: 'absolute', - background: ScratchJr.stagecolor, zIndex: '-10', + background: ScratchJr.stagecolor }); this.bkg.type = 'background'; ScratchJr.stage.pages.push(this);