Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 5 additions & 3 deletions js/blocks/GraphicsBlocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function setupGraphicsBlocks(activity) {
* @returns {number} - The heading value.
*/
arg(logo, turtle, blk) {
const connections = activity.blocks.blockList[blk]?.connections;
const connections = activity?.blocks?.blockList?.[blk]?.connections;
const parentId = connections?.[0];
if (
logo.inStatusMatrix &&
Expand Down Expand Up @@ -182,7 +182,8 @@ function setupGraphicsBlocks(activity) {
* @returns {number} - The Y-coordinate value.
*/
arg(logo, turtle, blk) {
const connections = activity.blocks.blockList[blk]?.connections;
const blocks = logo?.activity?.blocks || logo?.blocks || activity?.blocks;
const connections = blocks?.blockList?.[blk]?.connections;
const parentId = connections?.[0];
if (
logo.inStatusMatrix &&
Expand Down Expand Up @@ -268,7 +269,8 @@ function setupGraphicsBlocks(activity) {
* @returns {number} - The X-coordinate value.
*/
arg(logo, turtle, blk) {
const connections = activity.blocks.blockList[blk]?.connections;
const blocks = logo?.activity?.blocks || logo?.blocks || activity?.blocks;
const connections = blocks?.blockList?.[blk]?.connections;
const parentId = connections?.[0];
if (
logo.inStatusMatrix &&
Expand Down
5 changes: 4 additions & 1 deletion js/planetInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ class PlanetInterface {
this.newProject = () => {
this.closePlanet();
this.initialiseNewProject();
this.activity._loadStart();
// this.activity._loadStart();
if (this.activity && typeof this.activity._loadStart === "function") {
this.activity._loadStart();
}
this.saveLocally();
};

Expand Down
2 changes: 1 addition & 1 deletion js/widgets/statistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class StatsWindow {
this.widgetWindow.getWidgetBody().style.justifyContent = "space-between";
this.widgetWindow.getWidgetBody().style.padding = "0px 2vw";
} else {
this.widgetWindow.getWidgetBody().style.padding = "0px 0px";
this.widgetWindow.getWidgetBody().style.padding = "0px";
}
this.doAnalytics();
};
Expand Down
Loading