在 Flex 中调整子画布的大小
我试图弄清楚如何调整子画布的大小,但我不太明白。
我在父画布周围有一堆迷你画布,如下所示:
<mx:Canvas width="10" height="10" backgroundColor="#040404" top="0" left="0" id="anchorTL" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" right="0" top="0" id="anchorTR" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" horizontalCenter="0" top="0" id="anchorTM" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" verticalCenter="0" left="0" id="anchorML" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" left="0" bottom="0" id="anchorBL" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" horizontalCenter="0" bottom="0" id="anchorBM" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" bottom="0" right="0" id="anchorBR" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" right="0" verticalCenter="0" id="anchorMR" />
每种类型的调整大小(左上、右下等)各有一个,
如何让它们在单击并按住时调整画布大小?
I'm trying to figure out how to resize a child canvas but I can't quite figure it out.
I have a bunch of mini canvas' around a parent canvas like this:
<mx:Canvas width="10" height="10" backgroundColor="#040404" top="0" left="0" id="anchorTL" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" right="0" top="0" id="anchorTR" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" horizontalCenter="0" top="0" id="anchorTM" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" verticalCenter="0" left="0" id="anchorML" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" left="0" bottom="0" id="anchorBL" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" horizontalCenter="0" bottom="0" id="anchorBM" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" bottom="0" right="0" id="anchorBR" />
<mx:Canvas width="10" height="10" backgroundColor="#040404" right="0" verticalCenter="0" id="anchorMR" />
One for each type of resize (top left, bottom right, etc.)
How would I get these to resize the canvas on click and hold?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
已经有一个组件可以为您执行此操作(我之前也尝试过对其进行编码,但它并不像表面上看起来那么简单)。
http://www.objecthandles.com/
^ 让我知道这是否适合您或者您是否有更具体的需要。
There's already a component out there that'll do this for you (I've tried coding this up before too, it's not as simple as it seems on the surface).
http://www.objecthandles.com/
^ Let me know if that works for you or if you have a more specific need.