diff options
author | Abyss777 <abyss@fox5.ru> | 2016-11-10 14:25:30 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2016-11-10 14:25:30 +0500 |
commit | 9b36b690301faa7b84bade074aae3e863be5495d (patch) | |
tree | 2c889ef9a9ccbd4b9e4c52c3f937a8d65da20122 /web/app/DeviceImages.js | |
parent | fb76f0118e148f77c83fb55e75c805127bb597a2 (diff) | |
download | trackermap-web-9b36b690301faa7b84bade074aae3e863be5495d.tar.gz trackermap-web-9b36b690301faa7b84bade074aae3e863be5495d.tar.bz2 trackermap-web-9b36b690301faa7b84bade074aae3e863be5495d.zip |
- Simplify check
- Fix scale
Diffstat (limited to 'web/app/DeviceImages.js')
-rw-r--r-- | web/app/DeviceImages.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/app/DeviceImages.js b/web/app/DeviceImages.js index f96a3b06..fac16a57 100644 --- a/web/app/DeviceImages.js +++ b/web/app/DeviceImages.js @@ -25,7 +25,7 @@ Ext.define('Traccar.DeviceImages', { if (category) { device = Ext.getStore('DeviceImages').findRecord('key', category, 0, false, false, true); } - if (device === undefined || device === null) { + if (!device) { device = Ext.getStore('DeviceImages').findRecord('key', 'default', 0, false, false, true); } svg = Ext.clone(device.get('svg')); @@ -44,13 +44,13 @@ Ext.define('Traccar.DeviceImages', { rotateTransform = 'rotate(' + angle + ' ' + (width / 2) + ' ' + (height / 2) + ')'; svg.getElementById(device.get('rotateId')).setAttribute('transform', rotateTransform); - width *= Traccar.Style.mapScaleNormal; - height *= Traccar.Style.mapScaleNormal; if (zoom) { width *= Traccar.Style.mapScaleSelected; height *= Traccar.Style.mapScaleSelected; scaleTransform = 'scale(' + Traccar.Style.mapScaleSelected + ') '; } else { + width *= Traccar.Style.mapScaleNormal; + height *= Traccar.Style.mapScaleNormal; scaleTransform = 'scale(' + Traccar.Style.mapScaleNormal + ') '; } |