Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/icon.js

Issue 29350155: Issue 4353 - Fix syntax for modern Js Shell (Closed)
Patch Set: Created Aug. 24, 2016, 11:12 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/icon.js
diff --git a/lib/icon.js b/lib/icon.js
index 350389d672eb81b50da627173003b5a8e8d133ad..0d4fae007eb8ae645a9afd564d0e7254f9c73549 100644
--- a/lib/icon.js
+++ b/lib/icon.js
@@ -105,7 +105,7 @@ function renderFrames(notificationType)
loadImage("icons/abp-40-notification-" + notificationType + ".png")
]).then(images =>
{
- let images = {
+ let imageMap = {
Sebastian Noack 2016/08/24 11:30:04 Why must this variable no longer be called "images
kzar 2016/08/24 12:24:43 Js Shell got upset since images is also the name o
16: { base: [images[0], images[1]], overlay: images[2] },
19: { base: [images[3], images[4]], overlay: images[5] },
20: { base: [images[6], images[7]], overlay: images[8] },
@@ -129,9 +129,9 @@ function renderFrames(notificationType)
canvas.width = size;
canvas.height = size;
context.globalAlpha = 1;
- context.drawImage(images[size]["base"][whitelisted | 0], 0, 0);
+ context.drawImage(imageMap[size]["base"][whitelisted | 0], 0, 0);
context.globalAlpha = opacity;
- context.drawImage(images[size]["overlay"], 0, 0);
+ context.drawImage(imageMap[size]["overlay"], 0, 0);
imageData[size] = context.getImageData(0, 0, size, size);
}
frames["" + opacity + whitelisted] = imageData;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld