From 0e1ddb1feaf732b173005c5c1eedc1d82d165810 Mon Sep 17 00:00:00 2001 From: rupato-deriv <97010868+rupato-deriv@users.noreply.github.com> Date: Wed, 27 Sep 2023 17:06:07 +0800 Subject: [PATCH] fix: for trackJS issue (#10247) --- packages/bot-skeleton/src/scratch/dbot.js | 2 +- packages/bot-skeleton/src/scratch/utils/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/bot-skeleton/src/scratch/dbot.js b/packages/bot-skeleton/src/scratch/dbot.js index f08b3c81cf39..0a48c426da8e 100644 --- a/packages/bot-skeleton/src/scratch/dbot.js +++ b/packages/bot-skeleton/src/scratch/dbot.js @@ -123,7 +123,7 @@ class DBot { this.workspace.addChangeListener(event => updateDisabledBlocks(this.workspace, event)); this.workspace.addChangeListener(event => this.workspace.dispatchBlockEventEffects(event)); this.workspace.addChangeListener(event => { - if (event.type === 'endDrag') validateErrorOnBlockDelete(); + if (event.type === 'endDrag' && !is_mobile) validateErrorOnBlockDelete(); }); Blockly.derivWorkspace = this.workspace; diff --git a/packages/bot-skeleton/src/scratch/utils/index.js b/packages/bot-skeleton/src/scratch/utils/index.js index d139d259dd5f..52d88304da61 100644 --- a/packages/bot-skeleton/src/scratch/utils/index.js +++ b/packages/bot-skeleton/src/scratch/utils/index.js @@ -28,7 +28,7 @@ export const matchTranslateAttribute = translateString => { }; export const extractTranslateValues = () => { - const transform_value = Blockly?.derivWorkspace?.trashcan.svgGroup_.getAttribute('transform'); + const transform_value = Blockly?.derivWorkspace?.trashcan?.svgGroup_.getAttribute('transform'); const translate_xy = matchTranslateAttribute(transform_value); if (!translate_xy) {