<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Heck's  Blog]]></title> 
<link>https://www.heckjj.com/index.php</link> 
<description><![CDATA[一瞬间的决定，往往可以改变很多，事实上，让自己成功的往往不是知识，是精神！ 如果你总是为自己找借口，那只好让成功推迟。执行力，今天！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Heck's  Blog]]></copyright>
<item>
<link>https://www.heckjj.com/extjs-desktop-ico-auto-wrap/</link>
<title><![CDATA[解决Extjs的desktop图标自动换行的方法]]></title> 
<author>Heck &lt;@hecks.tk&gt;</author>
<category><![CDATA[Web开发]]></category>
<pubDate>Thu, 01 Sep 2011 16:17:30 +0000</pubDate> 
<guid>https://www.heckjj.com/extjs-desktop-ico-auto-wrap/</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-family: 微软雅黑;">在ext中的那个desktop的demo图标不能自动换行的，我们需要在desktop.js中加入自动换行的代码。下面看代码<br/>//shortcuts 自动换行<br/>var btnHeight = 61;<br/>var btnWidth = 64;<br/>var btnPadding = 15;<br/>var col = null;<br/>var row = null;<br/>function initColRow()&#123;<br/>col = &#123;index: 1, x: btnPadding&#125;;<br/>row = &#123;index: 1, y: btnPadding&#125;;<br/>&#125;<br/>initColRow();<br/>function isOverflow(y)&#123;<br/>if(y &gt; (Ext.lib.Dom.getViewHeight() – taskbarEl.getHeight()))&#123;<br/>return true;<br/>&#125;<br/>return false;<br/>&#125;<br/>this.setXY = function(item)&#123;<br/>var bottom = row.y + btnHeight,<br/>overflow = isOverflow(row.y + btnHeight);<br/><br/>if(overflow &amp;&amp; bottom &gt; (btnHeight + btnPadding))&#123;<br/>col = &#123;<br/>index: col.index++<br/>, x: col.x + btnWidth + btnPadding<br/>&#125;;<br/>row = &#123;<br/>index: 1<br/>, y: btnPadding<br/>&#125;;<br/>&#125;</span> <span style="font-family: 微软雅黑;"><br/><br/>Ext.fly(item).setXY([<br/>col.x<br/>, row.y<br/>]);<br/><br/>row.index++;<br/>row.y = row.y + btnHeight + btnPadding;<br/>&#125;;<br/>this.handleUpdate = function()&#123;<br/>initColRow();<br/>//var items=shortcuts.dom.children;<br/>var items=Ext.query(“dt”,shortcuts.dom);<br/>for(var i = 0, len = items.length; i &lt; len; i++)&#123;<br/>this.setXY(items[i]);<br/>&#125;<br/>&#125;<br/>this.handleUpdate();<br/>Ext.EventManager.onWindowResize(this.handleUpdate, this, &#123;delay:500&#125;);<br/>//end shortcuts 自动换行</span><br/>Tags - <a href="https://www.heckjj.com/tags/extjs/" rel="tag">extjs</a> , <a href="https://www.heckjj.com/tags/desktop/" rel="tag">desktop</a>
]]>
</description>
</item><item>
<link>https://www.heckjj.com/extjs-desktop-ico-auto-wrap/#blogcomment</link>
<title><![CDATA[[评论] 解决Extjs的desktop图标自动换行的方法]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.heckjj.com/extjs-desktop-ico-auto-wrap/#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>