Sidebar-Fan.js 2.31 KB
(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();
	};
})();