aboutsummaryrefslogtreecommitdiff
path: root/web/app/DeviceImages.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-11-10 14:25:30 +0500
committerAbyss777 <abyss@fox5.ru>2016-11-10 14:25:30 +0500
commit9b36b690301faa7b84bade074aae3e863be5495d (patch)
tree2c889ef9a9ccbd4b9e4c52c3f937a8d65da20122 /web/app/DeviceImages.js
parentfb76f0118e148f77c83fb55e75c805127bb597a2 (diff)
downloadtrackermap-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.js6
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 + ') ';
}