Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pxtblocks/plugins/duplicateOnDrag/connectionChecker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Blockly from "blockly";
import { shouldDuplicateOnDrag } from "./duplicateOnDrag";
import { isAllowlistedShadow, shouldDuplicateOnDrag } from "./duplicateOnDrag";


const OPPOSITE_TYPE: number[] = [];
Expand All @@ -16,7 +16,13 @@ export class DuplicateOnDragConnectionChecker extends Blockly.ConnectionChecker

const replacedBlock = b.targetBlock();

if (replacedBlock && shouldDuplicateOnDrag(replacedBlock)) return false;
if (
replacedBlock &&
shouldDuplicateOnDrag(replacedBlock) &&
!(replacedBlock.isShadow() && isAllowlistedShadow(replacedBlock))
) {
return false;
}

return true;
}
Expand Down
Loading