Sidebar-Fan.js
2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(function()
{
// Adds Atlassian shapes
Sidebar.prototype.addFanPalette = function()
{
var s = 'html=1;shadow=0;dashed=0;shape=mxgraph.atlassian.';
var s2 = 'html=1;shadow=0;dashed=0;fillColor=none;strokeColor=none;shape=mxgraph.bootstrap.rect;';
var s3 = mxConstants.STYLE_STROKEWIDTH + '=1;shadow=0;dashed=0;align=center;html=1;' + mxConstants.STYLE_SHAPE + "=mxgraph.mockup.";
var gn = 'mxgraph.fan';
var dt = 'fan ';
var sb = this;
var width = 66;
var height = 74;
this.setCurrentSearchEntryLibrary('fan');
var fns = [
this.createVertexTemplateEntry('image;image=img/lib/thingskit/fan/风机1.png;imageAspect=0;',
width, height, '', '风机1', null, null, this.getTagsForStencil(gn, '风机1', dt).join(' ')),
this.createVertexTemplateEntry('image;image=img/lib/thingskit/fan/风机2.png;imageAspect=0;',
width, height, '', '风机2', null, null, this.getTagsForStencil(gn, '风机2', dt).join(' ')),
this.createVertexTemplateEntry('image;image=img/lib/thingskit/fan/风机3.png;imageAspect=0;',
width, height, '', '风机3', null, null, this.getTagsForStencil(gn, '风机3', dt).join(' ')),
this.createVertexTemplateEntry('image;image=img/lib/thingskit/fan/风机4.png;imageAspect=0;',
width, height, '', '风机4', null, null, this.getTagsForStencil(gn, '风机4', dt).join(' ')),
this.createVertexTemplateEntry('image;image=img/lib/thingskit/fan/风机5.gif;imageAspect=0;',
width, height, '', '风机5', null, null, this.getTagsForStencil(gn, '风机5', dt).join(' ')),
this.createVertexTemplateEntry('image;image=img/lib/thingskit/fan/风机6.gif;imageAspect=0;',
width, height, '', '风机6', null, null, this.getTagsForStencil(gn, '风机6', dt).join(' ')),
this.createVertexTemplateEntry('image;image=img/lib/thingskit/fan/风机7.gif;imageAspect=0;',
width, height, '', '风机7', null, null, this.getTagsForStencil(gn, '风机7', dt).join(' ')),
this.createVertexTemplateEntry('image;image=img/lib/thingskit/fan/风机8.png;imageAspect=0;',
width, height, '', '风机8', null, null, this.getTagsForStencil(gn, '风机8', dt).join(' ')),
];
this.addPalette('fan', '风机', false, mxUtils.bind(this, function(content)
{
for (var i = 0; i < fns.length; i++)
{
content.appendChild(fns[i](content));
}
}));
this.setCurrentSearchEntryLibrary();
};
})();