1(function() 2{ 3 // Adds Arrow shapes with control points 4 Sidebar.prototype.addArrows2Palette = function() 5 { 6 var s = 'html=1;shadow=0;dashed=0;align=center;verticalAlign=middle;shape=mxgraph.arrows2.'; 7 var s2 = 'html=1;shadow=0;dashed=0;fillColor=none;strokeColor=none;shape=mxgraph.arrows2.'; 8 var gn = 'mxgraph.arrows2'; 9 var dt = 'arrow '; 10 var sb = this; 11 this.setCurrentSearchEntryLibrary('arrows2'); 12 13 var fns = [ 14 this.createVertexTemplateEntry(s + 'arrow;dy=0.6;dx=40;notch=0;', 15 100, 70, '', 'Arrow Right', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'right').join(' ')), 16 this.createVertexTemplateEntry(s + 'arrow;dy=0.6;dx=40;flipH=1;notch=0;', 17 100, 70, '', 'Arrow Left', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'left').join(' ')), 18 this.createVertexTemplateEntry(s + 'arrow;dy=0.6;dx=40;direction=north;notch=0;', 19 70, 100, '', 'Arrow Up', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'up').join(' ')), 20 this.createVertexTemplateEntry(s + 'arrow;dy=0.6;dx=40;direction=south;notch=0;', 21 70, 100, '', 'Arrow Down', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'down').join(' ')), 22 this.createVertexTemplateEntry(s + 'arrow;dy=0;dx=30;notch=30;', 23 100, 60, '', 'Chevron Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'chevron').join(' ')), 24 this.createVertexTemplateEntry(s + 'arrow;dy=0.6;dx=40;notch=15;', 25 100, 70, '', 'Notched Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'notched').join(' ')), 26 this.createVertexTemplateEntry(s + 'arrow;dy=0;dx=10;notch=10;', 27 100, 30, '', 'Notched Signal-In Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'notched signal in').join(' ')), 28 this.createVertexTemplateEntry(s + 'arrow;dy=0;dx=10;notch=0;', 29 100, 30, '', 'Signal-In Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'signal in').join(' ')), 30 this.createVertexTemplateEntry(s + 'arrow;dy=0.67;dx=20;notch=0;', 31 100, 60, '', 'Slender Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'slender').join(' ')), 32 this.createVertexTemplateEntry(s + 'twoWayArrow;dy=0.6;dx=35;', 33 100, 60, '', 'Two Way Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'two way').join(' ')), 34 this.createVertexTemplateEntry(s + 'twoWayArrow;dy=0.65;dx=22;', 35 100, 60, '', 'Slender Two Way Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'slender two way').join(' ')), 36 this.createVertexTemplateEntry(s + 'stylisedArrow;dy=0.6;dx=40;notch=15;feather=0.4;', 37 100, 60, '', 'Stylised Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'stylised notch notched').join(' ')), 38 this.createVertexTemplateEntry(s + 'sharpArrow;dy1=0.67;dx1=18;dx2=18;notch=0;', 39 100, 60, '', 'Sharp Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'sharp').join(' ')), 40 this.createVertexTemplateEntry(s + 'sharpArrow2;dy1=0.67;dx1=18;dx2=18;dy3=0.15;dx3=27;notch=0;', 41 100, 60, '', 'Sharp Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'sharp').join(' ')), 42 this.createVertexTemplateEntry(s + 'calloutArrow;dy=10;dx=20;notch=60;arrowHead=10;', 43 100, 60, '', 'Callout with Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'callout').join(' ')), 44 this.createVertexTemplateEntry(s + 'bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=0;', 45 100, 100, '', 'Bend Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'bend').join(' ')), 46 this.createVertexTemplateEntry(s + 'bendArrow;dy=15;dx=38;notch=0;arrowHead=55;rounded=1;', 47 100, 100, '', 'Bend Arrow (rounded)', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'bend rounded').join(' ')), 48 this.createVertexTemplateEntry(s + 'bendDoubleArrow;dy=15;dx=38;arrowHead=55;rounded=0;', 49 100, 100, '', 'Bend Double Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'bend double two way').join(' ')), 50 this.createVertexTemplateEntry(s + 'bendDoubleArrow;dy=15;dx=38;arrowHead=55;rounded=1;', 51 100, 100, '', 'Bend Double Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'bend double two way').join(' ')), 52 this.createVertexTemplateEntry(s + 'calloutDoubleArrow;dy=10;dx=20;notch=24;arrowHead=10;', 53 100, 50, '', 'Callout with Double Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'callout double two way').join(' ')), 54 this.createVertexTemplateEntry(s + 'calloutQuadArrow;dy=10;dx=20;notch=24;arrowHead=10;', 55 100, 100, '', 'Callout with Quad Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'callout quad four war').join(' ')), 56 this.createVertexTemplateEntry(s + 'calloutDouble90Arrow;dy1=10;dx1=20;dx2=70;dy2=70;arrowHead=10;', 57 100, 100, '', 'Callout with Double Arrow 90' + String.fromCharCode(176), null, null, this.getTagsForStencil(gn, 'arrow', dt + 'callout double two way orthogonal').join(' ')), 58 this.createVertexTemplateEntry(s + 'quadArrow;dy=10;dx=20;notch=24;arrowHead=10;', 59 100, 100, '', 'Quad Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'four way quad').join(' ')), 60 this.createVertexTemplateEntry(s + 'triadArrow;dy=10;dx=20;arrowHead=40;', 61 100, 70, '', 'Triad Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'three way triad').join(' ')), 62 this.createVertexTemplateEntry(s + 'tailedArrow;dy1=10;dx1=20;notch=0;arrowHead=20;dx2=25;dy2=30;', 63 100, 60, '', 'Tailed Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'tailed').join(' ')), 64 this.createVertexTemplateEntry(s + 'tailedNotchedArrow;dy1=10;dx1=20;notch=20;arrowHead=20;dx2=25;dy2=30;', 65 100, 60, '', 'Tailed Arrow with Notch', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'tailed notch notched').join(' ')), 66 this.createVertexTemplateEntry(s + 'stripedArrow;dy=0.6;dx=40;notch=25;', 67 100, 70, '', 'Striped Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'striped').join(' ')), 68 this.createVertexTemplateEntry(s + 'jumpInArrow;dy=15;dx=38;arrowHead=55;', 69 100, 100, '', 'Jump-In Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'jump in').join(' ')), 70 this.createVertexTemplateEntry(s + 'uTurnArrow;dy=11;arrowHead=43;dx2=25;', 71 100, 100, '', 'U Turn Arrow', null, null, this.getTagsForStencil(gn, 'arrow', dt + 'u turn uturn').join(' ')) 72 ]; 73 74 this.addPalette('arrows2', mxResources.get('arrows'), false, mxUtils.bind(this, function(content) 75 { 76 for (var i = 0; i < fns.length; i++) 77 { 78 content.appendChild(fns[i](content)); 79 } 80 })); 81 82 this.setCurrentSearchEntryLibrary(); 83 }; 84 85})(); 86