@@ -76,6 +76,8 @@ class SVG {
7676 return this . nnode ( x , y )
7777 case this . settings . SYMBOL_SNODE :
7878 return this . snode ( x , y )
79+ case this . settings . SYMBOL_FORTUNE :
80+ return this . fortune ( x , y )
7981 case this . settings . SYMBOL_ARIES :
8082 return this . aries ( x , y )
8183 case this . settings . SYMBOL_TAURUS :
@@ -636,7 +638,7 @@ class SVG {
636638 y = Math . round ( y + ( yShift * this . settings . SYMBOL_SCALE ) )
637639
638640 const wrapper = document . createElementNS ( this . context . root . namespaceURI , 'g' )
639- wrapper . setAttribute ( 'transform' , 'translate(' + ( - x * ( this . settings . SYMBOL_SCALE - 1 ) ) + ',' + ( - y * ( this . settings . SYMBOL_SCALE - 1 ) ) + ')' ) // scale(-1,1)
641+ wrapper . setAttribute ( 'transform' , 'translate(' + ( - x * ( this . settings . SYMBOL_SCALE - 1 ) ) + ',' + ( - y * ( this . settings . SYMBOL_SCALE - 1 ) ) + ')' )
640642
641643 const node = document . createElementNS ( this . context . root . namespaceURI , 'path' )
642644 node . setAttribute ( 'd' , 'm' + x + ', ' + y + ' l1.3333282470703125,0.666656494140625l0.6666717529296875,0l1.3333282470703125,-0.666656494140625l0.6666717529296875,-1.333343505859375l0,-0.666656494140625l-0.6666717529296875,-1.333343505859375l-1.3333282470703125,-0.666656494140625l-0.6666717529296875,0l-1.3333282470703125,0.666656494140625l-0.6666717529296875,1.333343505859375l0,0.666656494140625l0.6666717529296875,1.333343505859375l2,2.666656494140625l0.6666717529296875,2l0,1.333343505859375l-0.6666717529296875,2l-1.3333282470703125,1.333343505859375l-2,0.666656494140625l-2.6666717529296875,0l-2,-0.666656494140625l-1.3333282470703125,-1.333343505859375l-0.6666717529296875,-2l0,-1.333343505859375l0.6666717529296875,-2l2,-2.666656494140625l0.666656494140625,-1.333343505859375l0,-0.666656494140625l-0.666656494140625,-1.333343505859375l-1.333343505859375,-0.666656494140625l-0.666656494140625,0l-1.333343505859375,0.666656494140625l-0.666656494140625,1.333343505859375l0,0.666656494140625l0.666656494140625,1.333343505859375l1.333343505859375,0.666656494140625l0.666656494140625,0l1.333343505859375,-0.666656494140625m8,6l-0.6666717529296875,1.333343505859375l-1.3333282470703125,1.33331298828125l-2,0.66668701171875l-2.6666717529296875,0l-2,-0.66668701171875l-1.3333282470703125,-1.33331298828125l-0.6666717529296875,-1.333343505859375' )
@@ -647,6 +649,42 @@ class SVG {
647649
648650 return wrapper
649651 }
652+
653+ /*
654+ * Fortune path
655+ * @private
656+ *
657+ * @param {int } x
658+ * @param {int } y
659+ *
660+ * @return {SVGPathElement } path
661+ */
662+ fortune ( x : number , y : number ) : Element {
663+ // center symbol
664+ const xShift = - 10
665+ const yShift = - 8
666+ x = Math . round ( x + ( xShift * this . settings . SYMBOL_SCALE ) )
667+ y = Math . round ( y + ( yShift * this . settings . SYMBOL_SCALE ) )
668+
669+ const wrapper = document . createElementNS ( this . context . root . namespaceURI , 'g' )
670+ wrapper . setAttribute ( 'transform' , 'translate(' + ( - x * ( this . settings . SYMBOL_SCALE - 2 ) ) + ',' + ( - y * ( this . settings . SYMBOL_SCALE - 2 ) ) + ')' )
671+
672+ const path1 = document . createElementNS ( this . context . root . namespaceURI , 'path' )
673+ path1 . setAttribute ( 'd' , 'M15.971322059631348,8.000000953674316A7.971322252863855,7.971322252863855,0,0,1,8,15.97132396697998A7.971322252863855,7.971322252863855,0,0,1,0.028678132221102715,8.000000953674316A7.971322252863855,7.971322252863855,0,0,1,8,0.028677448630332947A7.971322252863855,7.971322252863855,0,0,1,15.971322059631348,8.000000953674316Z' )
674+ const path2 = document . createElementNS ( this . context . root . namespaceURI , 'path' )
675+ path2 . setAttribute ( 'd' , 'M2.668839454650879,2.043858766555786C6.304587364196777,5.906839370727539,9.94033432006836,9.769822120666504,13.576082229614258,13.632804870605469' )
676+ const path3 = document . createElementNS ( this . context . root . namespaceURI , 'path' )
677+ path3 . setAttribute ( 'd' , 'm2.5541272163391113,13.747519493103027c3.635746955871582,-3.8629846572875977,7.271494388580322,-7.72596549987793,10.90724229812622,-11.588947772979736' )
678+
679+ wrapper . setAttribute ( 'stroke' , this . settings . POINTS_COLOR )
680+ wrapper . setAttribute ( 'stroke-width' , this . settings . POINTS_STROKE . toString ( ) )
681+ wrapper . setAttribute ( 'fill' , 'none' )
682+ wrapper . appendChild ( path1 )
683+ wrapper . appendChild ( path2 )
684+ wrapper . appendChild ( path3 )
685+
686+ return wrapper
687+ }
650688
651689 /*
652690 * Aries symbol path
0 commit comments