Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
它是如何工作的?一个。矩形正在改变图层内的位置?或 b。图层改变了它在舞台内的位置?
我画了一个矩形,然后我把它拖到另一个地方,并输出 rect.getX() 和 rect.getY() 。它们始终保持 (10,10)。
如果你画一个矩形,然后对要拖动的矩形进行编码,矩形形状就会移动。矩形 x 和 y 值应该改变。
你说不是这样吗?粘贴一些代码,以便我们查看:)