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

Unified Diff: Tools/GardeningServer/scripts/pixelzoomer.js

Issue 359283003: Remove usages of jquery and add sugar.js from garden-o-matic. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: merge to ToT Created 6 years, 6 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 | « Tools/GardeningServer/scripts/model_unittests.js ('k') | Tools/GardeningServer/scripts/results.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/GardeningServer/scripts/pixelzoomer.js
diff --git a/Tools/GardeningServer/scripts/pixelzoomer.js b/Tools/GardeningServer/scripts/pixelzoomer.js
index 5e63e9a1ee96b31a53d8a9c749b72fd25b0f9170..aa9a21e4721172154916b472ee5b86d637d9ee99 100644
--- a/Tools/GardeningServer/scripts/pixelzoomer.js
+++ b/Tools/GardeningServer/scripts/pixelzoomer.js
@@ -63,7 +63,7 @@ function zoomImageContainer(url)
container.className = 'zoom-image-container';
var title = url.match(/\-([^\-]*)\.png/)[1];
-
+
var label = document.createElement('div');
label.className = 'label';
label.appendChild(document.createTextNode(title));
@@ -137,7 +137,9 @@ function handleMouseOut(e)
return;
// If e.relatedTarget is null, we've moused out of the document.
- $('pixel-zoom-container').detach();
+ var container = document.querySelector('.pixel-zoom-container');
+ if (container)
+ container.remove();
}
function handleMouseMove(e)
@@ -153,7 +155,8 @@ function handleMouseMove(e)
var resultContainer = (e.target.className == 'result-container') ?
e.target : parentOfType(e.target, '.result-container');
if (!resultContainer || !resultContainer.querySelector('img')) {
- $(container).detach();
+ if (container)
+ container.remove();
return;
}
« no previous file with comments | « Tools/GardeningServer/scripts/model_unittests.js ('k') | Tools/GardeningServer/scripts/results.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698