From b63d784c22bb6217527fb8ca9125e43292f41faf Mon Sep 17 00:00:00 2001 From: Hotte <root@ovanier.de> Date: Wed, 7 Dec 2016 10:55:52 +0100 Subject: [PATCH] GOL angepasst und mini layout anpassung --- config/layouts/default.json | 3 ++- config/layouts/default.json.skel | 3 ++- panels/GameOfLife/script.js | 20 +++++++++++++++++--- panels/werbung/script.js | 1 + 4 files changed, 22 insertions(+), 5 deletions(-) diff --git a/config/layouts/default.json b/config/layouts/default.json index 2b50ec5..65b57c3 100755 --- a/config/layouts/default.json +++ b/config/layouts/default.json @@ -35,7 +35,8 @@ "enddate": "30.11.2016" }, { - "filename": "OpenSourceInfoscreen.jpg" + "filename": "OpenSourceInfoscreen.jpg", + "enddate": "18.11.2016" } ] } diff --git a/config/layouts/default.json.skel b/config/layouts/default.json.skel index 2b50ec5..65b57c3 100755 --- a/config/layouts/default.json.skel +++ b/config/layouts/default.json.skel @@ -35,7 +35,8 @@ "enddate": "30.11.2016" }, { - "filename": "OpenSourceInfoscreen.jpg" + "filename": "OpenSourceInfoscreen.jpg", + "enddate": "18.11.2016" } ] } diff --git a/panels/GameOfLife/script.js b/panels/GameOfLife/script.js index 66e0ff7..dc99d19 100755 --- a/panels/GameOfLife/script.js +++ b/panels/GameOfLife/script.js @@ -11,14 +11,28 @@ var GOLData = { grid: 1 }; -this.loaded = function(panel, config) { +this.loaded=function(panel,config) { + console.log("TESTV"); GOLData.panel = panel; + console.log("TESTN"+panel); GOLData.config = config; GOLinit(); GOLdraw(); setTimeout(function(){setInterval(function() {GOLiterate(); GOLdraw();}, 500); }, 10000); } +this.show=function() { +} + +this.resize=function() { +} + +this.hide = function() { +} + +this.checkShowCondition = function() { +} + function GOLinit(){ //if(GOLData.config[initType] == "random") { //GOLinitRandom(); @@ -258,8 +272,8 @@ function GOLcountDead(temp,x,y){ function GOLinitDraw(){ GOLData.canvas = document.getElementById("GOLCanvas"); GOLData.context = document.getElementById("GOLCanvas").getContext("2d"); - GOLData.canvas.width = panel.width(); - GOLData.canvas.height = panel.height(); + GOLData.canvas.width = GOLData.panel.width(); + GOLData.canvas.height = GOLData.panel.height(); if(GOLData.grid) { GOLData.sWidth = (GOLData.canvas.width-(GOLData.vAmount+1)) / GOLData.vAmount; GOLData.sHeight = (GOLData.canvas.height-(GOLData.hAmount+1)) / GOLData.hAmount; diff --git a/panels/werbung/script.js b/panels/werbung/script.js index 2e98c0e..a03cd60 100755 --- a/panels/werbung/script.js +++ b/panels/werbung/script.js @@ -2,6 +2,7 @@ var nextWerbung=0; var werbung_config = null; var werbung_img_display = null; var werbung_panel = null; + this.loaded=function(panel,config) { werbung_panel = panel; werbung_config = config -- GitLab