changeset 590:395d5ccd9ed1 annotations

fix rendering of imported arrows
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 Sep 2026 10:39:39 +0200
parents 5cd0db97602b
children 632cb930ac87
files ViewerPlugin/WebApplication/viewer.js
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ViewerPlugin/WebApplication/viewer.js	Fri Sep 04 18:13:14 2026 +0200
+++ b/ViewerPlugin/WebApplication/viewer.js	Mon Sep 07 10:39:39 2026 +0200
@@ -925,12 +925,17 @@
       this.drawImportedSource = new ol.source.Vector();
       this.drawImportedLayer = new ol.layer.Vector({
         source: this.drawImportedSource,
-        style: function(feature) {
+        style: function(feature, resolution) {
           var entry = GetImportedLayerById(feature.get('layer-id'));
           if (!entry || !entry.visible) {
             return null;
           }
-          return CreateLayerStyle(entry.color);
+
+          if (feature.get('type') === 'arrow') {
+            return CreateArrowStyle(feature, resolution, entry.color);
+          } else {
+            return CreateLayerStyle(entry.color);
+          }
         }
       });
       this.map.addLayer(this.drawImportedLayer);