Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cardinal.js to v1.0.1 #452

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 10 additions & 6 deletions plugins/cardinal.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
south: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFAQMAAAC3obSmAAAABlBMVEVHcEz///+flKJDAAAAAXRSTlMAQObYZgAAABJJREFUCNdjKGBwYChgEGAoAAAIigGhv1KChwAAAABJRU5ErkJggg",
west : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKAQMAAAC3/F3+AAAABlBMVEVHcEz///+flKJDAAAAAXRSTlMAQObYZgAAABhJREFUCNdjYGBgOHAAhM4gIWMGEGJgAACnnQmX+CnbdwAAAABJRU5ErkJggg"
},
buildGridCopy = buildGrid;
buildGridCopy = Canvas.buildGrid;

Plugin.register("cardinal", {
title: "Cardinal",
author: "Bug1312",
description: "Adds in all cardinal directions on the grid and renders them on-top of everything while facing the camera.",
about: "If you wish to change the color, use custom CSS to set the variable 'cardinal' to any color!",
icon: "border_outer",
version: "1.0.0",
version: "1.0.1",
variant: "both",
onload() {
window.buildGrid = function() {
Canvas.buildGrid = function() {
// Default grid
buildGridCopy();

Expand All @@ -30,10 +30,14 @@
addMark(images.south, [ 0.0, 9.5 ]);
addMark(images.west, [-9.5, 0.0 ]);
};
buildGrid();
window.buldGrid = Canvas.buildGrid;
Canvas.buildGrid();
},
onunload() { window.buildGrid = buildGridCopy },
onuninstall() { buildGrid() }
onunload() {
Canvas.buildGrid = buildGridCopy;
window.buldGrid = Canvas.buildGrid;
},
onuninstall() { Canvas.buildGrid() }
});

function addMark(src, pos) {
Expand Down
Loading