mirror of
https://github.com/openstf/stf
synced 2025-10-06 03:50:04 +02:00
Image size was cached in the wrong place, causing it to not be cached at all.
This commit is contained in:
parent
df770286d0
commit
5ade5fd61c
1 changed files with 3 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue