From 59ea882e9a162599d1bb1dbcd550ad084b3bb24e Mon Sep 17 00:00:00 2001 From: synth-ruiner Date: Sat, 23 Dec 2017 22:33:31 +0000 Subject: [PATCH] allow palette changes when loading game data --- includes/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/script.js b/includes/script.js index 28dd653..546df47 100644 --- a/includes/script.js +++ b/includes/script.js @@ -284,7 +284,7 @@ $(document).ready(function() { } }); }); - + document.getElementById('room-output').getContext('2d').putImageData(imageData, 0, 0); }); }, 30); @@ -311,7 +311,7 @@ $(document).ready(function() { readFile(this); }); - $('#palette input').on('change', function() { + $(document).on('change', '#palette input', function() { // if this is a colour input, update the palette if ($(this).attr('type') === 'color') { palette[$(this).attr('name')] = hexToColour($(this).val());