Skip to content

Commit

Permalink
Correct positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
vidakovic committed Feb 5, 2015
1 parent ac087eb commit 9707e14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions gadget/scripts/wakatime.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ function createTextOverlay(string) {
context.lineWidth = 6;
context.lineStyle = '#000';
context.fillStyle = '#FFF';
context.textAlign = 'left';
context.textBaseline = 'top';
context.textAlign = 'center';
context.textBaseline = 'bottom';
context.strokeText(string, canvas.width / 2, canvas.height / 2);
context.fillText(string, canvas.width / 2, canvas.height / 2);

Expand All @@ -42,7 +42,7 @@ function showOverlay() {
//var overlayImage = gapi.hangout.av.effects.createImageResource(logoUrl);
var overlayImage = gapi.hangout.av.effects.createImageResource(createTextOverlay('Time: 00:00:23'));
overlayEffect = overlayImage.createOverlay(options);
overlayEffect.setPosition(0, 0.45);
overlayEffect.setPosition(-0.5, 0.45);
overlayEffect.setVisible(true);
}

Expand Down
6 changes: 3 additions & 3 deletions public/wakatime.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ function createTextOverlay(string) {
context.lineWidth = 6;
context.lineStyle = '#000';
context.fillStyle = '#FFF';
context.textAlign = 'left';
context.textBaseline = 'top';
context.textAlign = 'center';
context.textBaseline = 'bottom';
context.strokeText(string, canvas.width / 2, canvas.height / 2);
context.fillText(string, canvas.width / 2, canvas.height / 2);
Expand All @@ -88,7 +88,7 @@ function showOverlay() {
//var overlayImage = gapi.hangout.av.effects.createImageResource(logoUrl);
var overlayImage = gapi.hangout.av.effects.createImageResource(createTextOverlay('Time: 00:00:23'));
overlayEffect = overlayImage.createOverlay(options);
overlayEffect.setPosition(0, 0.45);
overlayEffect.setPosition(-0.5, 0.45);
overlayEffect.setVisible(true);
}
Expand Down

0 comments on commit 9707e14

Please sign in to comment.