mit-cml / workspace-multiselect

A Blockly plugin that allows you to drag, select and manipulate multiple blocks in the workspace.
https://hollowman6.github.io/workspace-multiselect/multi-workspace
11 stars 12 forks source link

this.draggedConnectionManager_ is undefined #42

Closed SebCanet closed 6 months ago

SebCanet commented 6 months ago

Hello, when installing several plugins in my application, unless I've made some declaration errors, I've noticed that there are conflicts due to function names. With the @mit-app-inventor/blockly-plugin-workspace-multiselect plugin, which has the same 'copy' function name as the keyboard navigation plugin, I need to initialize the keyboard navigation plugin after the multi-select plugin, thanks (https://groups.google.com/g/blockly/c/MuL2Ln8SwDU) .

But if I select (keyboard shortcut or icon lick on workspace) it works and when I release by clicking group icon on workspace, here is the message: this.draggedConnectionManager is undefined patchUpdateBlockAfterMove/this.BaseBlockDragger.prototype.updateBlockAfterMove@webpack-internal:///./src/index.ts:9415:13 endDrag@webpack-internal:///./node_modules/blockly/blockly_compressed.js:1263:266 endDrag/<@webpack-internal:///./src/index.ts:9384:21 endDrag@webpack-internal:///./src/index.ts:9378:25 handleUp@webpack-internal:///./node_modules/blockly/blockly_compressed.js:667:212 f@webpack-internal:///./node_modules/blockly/blockly_compressed.js:84:159 EventListener.handleEvent*conditionalBind$$module$build$src$core$browser_events@webpack-internal:///./node_modules/blockly/blockly_compressed.js:84:393 bindMouseEvents@webpack-internal:///./node_modules/blockly/blockly_compressed.js:665:23 doStart@webpack-internal:///./node_modules/blockly/blockly_compressed.js:664:151 handleWsStart@webpack-internal:///./node_modules/blockly/blocklycompressed.js:673:8 wrappedFunc@webpack-internal:///./src/index.ts:9132:14 onMouseDown@webpack-internal:///./node_modules/blockly/blockly_compressed.js:1089:428 f@webpack-internal:///./node_modules/blockly/blockly_compressed.js:84:149

Thanks for your help.

HollowMan6 commented 6 months ago

I need to initialize the keyboard navigation plugin after the multi-select plugin, thanks (https://groups.google.com/g/blockly/c/MuL2Ln8SwDU)

Yes, I made that comment there.

But if I select (keyboard shortcut or icon lick on workspace) it works and when I release by clicking group icon on workspace, here is the message: this.draggedConnectionManager is undefined patchUpdateBlockAfterMove/this.BaseBlockDragger.prototype.updateBlockAfterMove@webpack-internal:///./src/index.ts:9415:13 endDrag@webpack-internal:///./node_modules/blockly/blockly_compressed.js:1263:266 endDrag/<@webpack-internal:///./src/index.ts:9384:21 endDrag@webpack-internal:///./src/index.ts:9378:25 handleUp@webpack-internal:///./node_modules/blockly/blockly_compressed.js:667:212 f@webpack-internal:///./node_modules/blockly/blockly_compressed.js:84:159 EventListener.handleEvent*conditionalBind$$module$build$src$core$browser_events@webpack-internal:///./node_modules/blockly/blockly_compressed.js:84:393 bindMouseEvents@webpack-internal:///./node_modules/blockly/blockly_compressed.js:665:23 doStart@webpack-internal:///./node_modules/blockly/blockly_compressed.js:664:151 handleWsStart@webpack-internal:///./node_modules/blockly/blocklycompressed.js:673:8 wrappedFunc@webpack-internal:///./src/index.ts:9132:14 onMouseDown@webpack-internal:///./node_modules/blockly/blockly_compressed.js:1089:428 f@webpack-internal:///./node_modules/blockly/blockly_compressed.js:84:149

Looks like our patch has been interfered with by other code/plugin, not sure how this happened, but soon we are going to get rid of those monkey patches in Blockly 11 #39. Let's see how it goes then. https://github.com/mit-cml/workspace-multiselect/blob/aafc9bcbda6f1f4763db76eba7d98856044ed136/src/multiselect_block_dragger.js#L152-L176

HollowMan6 commented 6 months ago

Okay, looks like they have deprecated insertion marker https://github.com/google/blockly/pull/7797

HollowMan6 commented 6 months ago

Okay, so basically we do not support blockly 10.4.0+ due to https://github.com/google/blockly/commit/0b344e7fab3ba50eaf7e288ece5d6f5036388c19 I will update PR #38 to get it supported.

HollowMan6 commented 6 months ago

Now this.draggedConnectionManager_ is undefined is fixed in #38. We will release that into v0.1.12, try that out now if you like.