Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2689)

Unified Diff: chrome/renderer/resources/offline.js

Issue 609853002: Offline intersitital - Fix sprite clipping and clipped button highlight (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix 'details' link bug Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/resources/neterror.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/resources/offline.js
diff --git a/chrome/renderer/resources/offline.js b/chrome/renderer/resources/offline.js
index 4876abf9955dd4b87013cc43b9222763a9a43dec..31b3a8ee66169021507df05ec98acfd4be5432e7 100644
--- a/chrome/renderer/resources/offline.js
+++ b/chrome/renderer/resources/offline.js
@@ -19,6 +19,7 @@ function Runner(outerContainerId, opt_config) {
this.outerContainerEl = document.querySelector(outerContainerId);
this.containerEl = null;
+ this.detailsButton = document.querySelector('#details-button');
arv (Not doing code reviews) 2014/09/29 16:47:42 Should this be this.outerContainerEl.querySelecto
edwardjung 2014/09/29 17:32:56 Done.
this.config = opt_config || Runner.config;
@@ -578,22 +579,24 @@ Runner.prototype = {
* @param {Event} e
*/
onKeyDown: function(e) {
- if (!this.crashed && (Runner.keycodes.JUMP[String(e.keyCode)] ||
- e.type == Runner.events.TOUCHSTART)) {
- if (!this.activated) {
- this.loadSounds();
- this.activated = true;
- }
+ if (e.target != this.detailsButton) {
+ if (!this.crashed && (Runner.keycodes.JUMP[String(e.keyCode)] ||
+ e.type == Runner.events.TOUCHSTART)) {
+ if (!this.activated) {
+ this.loadSounds();
+ this.activated = true;
+ }
- if (!this.tRex.jumping) {
- this.playSound(this.soundFx.BUTTON_PRESS);
- this.tRex.startJump();
+ if (!this.tRex.jumping) {
+ this.playSound(this.soundFx.BUTTON_PRESS);
+ this.tRex.startJump();
+ }
}
- }
- if (this.crashed && e.type == Runner.events.TOUCHSTART &&
- e.currentTarget == this.containerEl) {
- this.restart();
+ if (this.crashed && e.type == Runner.events.TOUCHSTART &&
+ e.currentTarget == this.containerEl) {
+ this.restart();
+ }
}
// Speed drop, activated only when jump key is not pressed.
@@ -1855,7 +1858,7 @@ function Cloud(canvas, cloudImg, containerWidth) {
* @enum {number}
*/
Cloud.config = {
- HEIGHT: 13,
+ HEIGHT: 14,
MAX_CLOUD_GAP: 400,
MAX_SKY_LEVEL: 30,
MIN_CLOUD_GAP: 100,
« no previous file with comments | « chrome/renderer/resources/neterror.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698