changeset 1333:1e94680cbc51

vector point uses pin-like svg-path now.
author robcast
date Tue, 27 Jan 2015 11:45:37 +0100
parents 1d6dfca1709f
children 08296a1ef2d5
files webapp/src/main/webapp/jquery/jquery.digilib.vector.js
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.vector.js	Tue Jan 27 10:23:06 2015 +0100
+++ b/webapp/src/main/webapp/jquery/jquery.digilib.vector.js	Tue Jan 27 11:45:37 2015 +0100
@@ -344,10 +344,11 @@
              * Point
              */
             var p1 = trafo.transform(geom.position(coords[0]));
-            var $elem = $(svgElement('circle', {
+            // point uses pin-like path of size 3*pu
+            var pu = hs / 3;
+            var $elem = $(svgElement('path', {
                 'id': id, 'class': cssclass,
-                'cx': p1.x, 'cy': p1.y,
-                'r': hs,
+                'd': 'M '+p1.x+','+p1.y+' l '+2*pu+','+pu+' c '+2*pu+','+pu+' '+0+','+3*pu+' '+(-pu)+','+pu+' Z',
                 'stroke': stroke, 'stroke-width': strokeWidth, 
                 'fill': fill, 'style': style}));
             shape.$elem = $elem;