The initial mousedown handler is shown in Listing 11.
最初的mousedown处理程序如清单11所示。
The text element has two events that it reacts to — mouseover and mousedown.
文字元素可以对两种事件做出反应——mouseover和mousedown。
So when the shadow tree's rectangle receives a mousedown event, I change the CSS fill property to something a little flashier -- say pink.
因此,当影像树的矩形接收到mousedown事件时,我把CSS 的fill属性改成稍微亮一点的颜色——比如粉红色。
However, at first, you only want to install the mousedown handler, because you're still waiting for the click that initiates the drag-and-drop sequence.
不过,开始时,只需安装mousedown处理程序,因为此时您尚在等待激发初始化拖放过程的单击。
However, at first, you only want to install the mousedown handler, because you're still waiting for the click that initiates the drag-and-drop sequence.
不过,开始时,只需安装mousedown处理程序,因为此时您尚在等待激发初始化拖放过程的单击。
应用推荐