aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-11-08 11:49:00 +0500
committerAbyss777 <abyss@fox5.ru>2016-11-08 11:49:00 +0500
commit8b5bbc7a899205a40e1d246862f54ecb4b939682 (patch)
tree071387887d5900cfcdcbbfbcc7fda4f4b0f35c1d /web/app
parent97fd53f33b92e334e6094edb340ea551a44d136e (diff)
downloadtrackermap-web-8b5bbc7a899205a40e1d246862f54ecb4b939682.tar.gz
trackermap-web-8b5bbc7a899205a40e1d246862f54ecb4b939682.tar.bz2
trackermap-web-8b5bbc7a899205a40e1d246862f54ecb4b939682.zip
Load SVGs to html
Diffstat (limited to 'web/app')
-rw-r--r--web/app/store/DeviceImages.js18
1 files changed, 5 insertions, 13 deletions
diff --git a/web/app/store/DeviceImages.js b/web/app/store/DeviceImages.js
index 57745f1c..4e49482c 100644
--- a/web/app/store/DeviceImages.js
+++ b/web/app/store/DeviceImages.js
@@ -22,28 +22,28 @@ Ext.define('Traccar.store.DeviceImages', {
data: [{
key: 'default',
name: Strings.categoryDefault,
- url: 'images/arrow.svg',
+ elementId: 'arrowSvg',
rotateId: 'arrow',
fillId: 'arrow',
scale: 1
}, {
key: 'car',
name: Strings.categoryCar,
- url: 'images/car.svg',
+ elementId: 'carSvg',
fillId: 'path4149',
rotateId: 'g4207',
scale: 0.06,
}, {
key: 'bus',
name: Strings.categoryBus,
- url: 'images/bus.svg',
+ elementId: 'busSvg',
fillId: 'path4713',
rotateId: 'layer2',
scale: 0.12,
}, {
key: 'truck',
name: Strings.categoryTruck,
- url: 'images/truck.svg',
+ elementId: 'truckSvg',
fillId: 'path4718',
rotateId: 'layer2',
scale: 0.1,
@@ -52,15 +52,7 @@ Ext.define('Traccar.store.DeviceImages', {
constructor: function() {
this.callParent(arguments);
this.config.data.forEach(function (device) {
- if (device.url) {
- Ext.Ajax.request({
- url: device.url,
- scope: device,
- success: function (response) {
- this.svg = new DOMParser().parseFromString(response.responseText, "image/svg+xml");
- }
- });
- }
+ device.svg = document.getElementById(device.elementId).contentDocument;
});
}
}); \ No newline at end of file