1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00

Image size was cached in the wrong place, causing it to not be cached at all.

This commit is contained in:
Simo Kinnunen 2014-09-12 21:50:15 +09:00
parent df770286d0
commit 5ade5fd61c

View file

@ -50,6 +50,9 @@ module.exports = function DeviceScreenDirective($document, ScalingService,
}
}
var cachedImageWidth = 0
, cachedImageHeight = 0
// NOTE: instead of fa-pane-resize, a fa-child-pane-resize could be better
var onPanelResizeThrottled = _.throttle(updateBounds, 16)
scope.$on('fa-pane-resize', onPanelResizeThrottled)
@ -187,9 +190,6 @@ module.exports = function DeviceScreenDirective($document, ScalingService,
function on() {
imageRender.onLoad = function (image) {
var cachedImageWidth = 0
, cachedImageHeight = 0
loading = false
if (scope.$parent.showScreen) {