scratchblocks-plus 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/scratchblocks-plus.min.es.js +2 -2
- package/build/scratchblocks-plus.min.es.js.map +1 -1
- package/build/scratchblocks-plus.min.js +2 -2
- package/build/scratchblocks-plus.min.js.map +1 -1
- package/build/scratchblocks.min.es.js +7384 -0
- package/build/scratchblocks.min.es.js.map +1 -0
- package/build/scratchblocks.min.js +6922 -0
- package/build/scratchblocks.min.js.map +1 -0
- package/build/translations-all-es.js +1 -1
- package/build/translations-all-es.js.map +1 -0
- package/build/translations-all.js +1 -1
- package/build/translations-all.js.map +1 -0
- package/build/translations-es.js +1 -1
- package/build/translations-es.js.map +1 -0
- package/build/translations.js +1 -1
- package/build/translations.js.map +1 -0
- package/package.json +1 -1
- package/scratch2/blocks.js +21 -3
- package/scratch3/blocks.js +7 -3
- package/syntax/model.js +7 -0
package/scratch3/blocks.js
CHANGED
|
@@ -244,7 +244,7 @@ export class MatrixView {
|
|
|
244
244
|
if (isFilled) {
|
|
245
245
|
rect.setAttribute("fill", "#FFFFFF")
|
|
246
246
|
} else {
|
|
247
|
-
rect
|
|
247
|
+
addClass(rect, `sb3-${parent.info.category}`)
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
elements.push(rect)
|
|
@@ -997,7 +997,9 @@ class DocumentView {
|
|
|
997
997
|
* Build the element map by finding all elements with data-block-path
|
|
998
998
|
*/
|
|
999
999
|
_buildElementMap() {
|
|
1000
|
-
if (!this.el)
|
|
1000
|
+
if (!this.el || !this.el.querySelectorAll) {
|
|
1001
|
+
return
|
|
1002
|
+
}
|
|
1001
1003
|
|
|
1002
1004
|
this.elementMap.clear()
|
|
1003
1005
|
const blocks = this.el.querySelectorAll("[data-block-path]")
|
|
@@ -1028,7 +1030,9 @@ class DocumentView {
|
|
|
1028
1030
|
*/
|
|
1029
1031
|
highlightBlock(path, options = {}) {
|
|
1030
1032
|
const el = this.getElementByPath(path)
|
|
1031
|
-
if (!el)
|
|
1033
|
+
if (!el) {
|
|
1034
|
+
return false
|
|
1035
|
+
}
|
|
1032
1036
|
|
|
1033
1037
|
// Add highlight class to the first child (the shape element)
|
|
1034
1038
|
const shapeEl = el.firstElementChild
|
package/syntax/model.js
CHANGED
|
@@ -394,6 +394,13 @@ export class Block {
|
|
|
394
394
|
return
|
|
395
395
|
}
|
|
396
396
|
|
|
397
|
+
if (
|
|
398
|
+
this.info.category === "custom-arg" ||
|
|
399
|
+
this.info.category === "custom"
|
|
400
|
+
) {
|
|
401
|
+
return
|
|
402
|
+
}
|
|
403
|
+
|
|
397
404
|
const oldSpec = this.info.language.commands[id]
|
|
398
405
|
|
|
399
406
|
const nativeSpec = lang.commands[id]
|