jspsych-tangram 0.0.21 → 0.0.22
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/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/prep-wtargets/index.browser.js +5 -3
- package/dist/prep-wtargets/index.browser.js.map +1 -1
- package/dist/prep-wtargets/index.browser.min.js +6 -6
- package/dist/prep-wtargets/index.browser.min.js.map +1 -1
- package/dist/prep-wtargets/index.cjs +5 -3
- package/dist/prep-wtargets/index.cjs.map +1 -1
- package/dist/prep-wtargets/index.js +5 -3
- package/dist/prep-wtargets/index.js.map +1 -1
- package/package.json +1 -1
- package/src/plugins/tangram-prep-wtargets/PrepWTargetsApp.tsx +7 -5
- package/tangram-prep-wtargets.min.js +6 -6
|
@@ -3958,15 +3958,17 @@ function PrepWTargetsApp({ params, jsPsych }) {
|
|
|
3958
3958
|
reconColors = [];
|
|
3959
3959
|
sector.pieces.forEach((piece) => {
|
|
3960
3960
|
if (piece.vertices && piece.vertices.length > 0) {
|
|
3961
|
-
const poly = piece.vertices[0].map(([x, y]) => ({ x, y }));
|
|
3962
|
-
reconPolys.push(poly);
|
|
3963
3961
|
const color = getPieceColorFromId(
|
|
3964
3962
|
piece.blueprintId,
|
|
3965
3963
|
usePrimitiveColorsReconstructions || false,
|
|
3966
3964
|
CONFIG.color.piece.validFill,
|
|
3967
3965
|
primitiveColorIndices || [0, 1, 2, 3, 4]
|
|
3968
3966
|
);
|
|
3969
|
-
|
|
3967
|
+
piece.vertices.forEach((polyArr) => {
|
|
3968
|
+
const poly = polyArr.map(([x, y]) => ({ x, y }));
|
|
3969
|
+
reconPolys.push(poly);
|
|
3970
|
+
reconColors.push(color);
|
|
3971
|
+
});
|
|
3970
3972
|
}
|
|
3971
3973
|
});
|
|
3972
3974
|
if (reconPolys.length === 0) {
|