我需要您的帮助,我正在使用此代码从特定位置到鼠标位置创建一条线。单击后,我试图删除此行,但我不知道如何在单击后帮助我删除直播,我应该更改什么?
stk:= (LineMorph from: 100@100 to: 1300@1300 color: Color red width: 2) openInWorld.
handle := HandleMorph new forEachPointDo: [:newPoint | stk setVertices: {whiteBallinHole position. (newPoint-(10@10)). }.
stk on: #mouseDown send: #value: to:[:evt|
evt redButtonPressed ifTrue:[ self handlesMouseDown: evt.
“鼠标点击后删除棒,此操作无效,请帮助”
stk color: Color transparent.
stk delete.
“”
].
].
].
" (self currentHand attachMorph: handle)."
" self currentHand addMorph:handle. "
self currentHand attachMorph:handle.