Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Included grafix for pause and play

- bug: no dragging after play image was displayed
- bug: each drag instantiates another timer making time run out fast

Signed-off-by: Felix Speiser <felix.speiser@gmail.com>
  • Loading branch information...
commit 3abb239396aaa1bd313234728ce63852c6d7f016 1 parent 00e9656
@Fspeiser Fspeiser authored
Showing with 24 additions and 13 deletions.
  1. +24 −13 index.html
  2. BIN  pause.png
  3. BIN  play.png
View
37 index.html
@@ -31,6 +31,12 @@
var dragIMG=new Image();
dragIMG.src='drag.png';
+ var pauseIMG=new Image();
+ pauseIMG.src='pause.png';
+
+ var playIMG=new Image();
+ playIMG.src='play.png';
+
//Variablen mit globalem scope initialisieren
var zeitverlauf;
var zeigercanvas;
@@ -143,9 +149,11 @@
//Wenn Pause, dann Pausensymbol mitmalen
if (gPause==true) {
- zeiger.fillStyle="rgb(255,255,255)";
- zeiger.fillRect(startingpointH-10,startingpointV-11,8,22);
- zeiger.fillRect(startingpointH+2,startingpointV-11,8,22);
+ //zeiger.fillStyle="rgb(255,255,255)";
+ //zeiger.fillRect(startingpointH-10,startingpointV-11,8,22);
+ //zeiger.fillRect(startingpointH+2,startingpointV-11,8,22);
+ zeiger.drawImage(pauseIMG,startingpointH-radius/24,startingpointV-radius/24,radius/12,(radius/12)*(pauseIMG.height/pauseIMG.width));
+
}
@@ -258,19 +266,22 @@
zeiger.arc(startingpointH,startingpointV,25,0,2*Math.PI,true)
zeiger.fill();
- zeiger.fillStyle="rgb(255,255,255)";
- zeiger.beginPath();
- zeiger.moveTo(startingpointH-6,startingpointV-11);
- zeiger.lineTo(startingpointH+10,startingpointV);
- zeiger.lineTo(startingpointH-6,startingpointV+11);
- zeiger.lineTo(startingpointH-6,startingpointV-11);
- zeiger.fill();
+ //zeiger.fillStyle="rgb(255,255,255)";
+ //zeiger.beginPath();
+ //zeiger.moveTo(startingpointH-6,startingpointV-11);
+ //zeiger.lineTo(startingpointH+10,startingpointV);
+ //zeiger.lineTo(startingpointH-6,startingpointV+11);
+ //zeiger.lineTo(startingpointH-6,startingpointV-11);
+ //zeiger.fill();
+ zeiger.drawImage(playIMG,startingpointH-radius/24,startingpointV-radius/24,radius/12,(radius/12)*(playIMG.height/playIMG.width));
gPause=false;
} else {
gPause=true;
- zeiger.fillStyle="rgb(255,255,255)";
- zeiger.fillRect(startingpointH-10,startingpointV-11,8,22);
- zeiger.fillRect(startingpointH+2,startingpointV-11,8,22);
+ //zeiger.fillStyle="rgb(255,255,255)";
+ //zeiger.fillRect(startingpointH-10,startingpointV-11,8,22);
+ //zeiger.fillRect(startingpointH+2,startingpointV-11,8,22);
+ zeiger.drawImage(pauseIMG,startingpointH-radius/24,startingpointV-radius/24,radius/12,(radius/12)*(pauseIMG.height/pauseIMG.width));
+
}
} else if (e.keyCode==38){
//5 Minuten runter
View
BIN  pause.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  play.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.