Update borders.js
This commit is contained in:
parent
8100e2ab0d
commit
b9e61a7585
|
|
@ -1,4 +1,8 @@
|
|||
window.addEventListener("load", () => {
|
||||
let oldPreRenderer = viewInfo[1].pre;
|
||||
let oldPixelRenderer = viewInfo[1].pixel;
|
||||
viewInfo[1].pre = function(ctx) {
|
||||
if (oldPreRenderer) oldPreRenderer(ctx);
|
||||
currentPixels.forEach(pixel => {
|
||||
if (elements[pixel.element].movable !== true || elements[pixel.element].isGas === true) return;
|
||||
let edge = false;
|
||||
|
|
@ -16,8 +20,6 @@ viewInfo[1].pre = function(ctx) {
|
|||
})
|
||||
}
|
||||
|
||||
let oldPixelRenderer = viewInfo[1].pixel;
|
||||
|
||||
viewInfo[1].pixel = function(pixel, ctx) {
|
||||
if (elements[pixel.element].movable) return oldPixelRenderer(pixel, ctx);
|
||||
let edge = false;
|
||||
|
|
@ -54,3 +56,5 @@ viewInfo[1].pixel = function(pixel, ctx) {
|
|||
// })
|
||||
// }
|
||||
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue