动力学阻力与阻力放下-没有发布不一致 [英] kineticjs drag & drop - no release inconsistency

查看:90
本文介绍了动力学阻力与阻力放下-没有发布不一致的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,在4.3.0版中,拖放操作在我的阶段可以正常工作,所以我只想了解为什么在4.3.3.中出现以下问题.

First of all drag and drop works correctly in my stages in version 4.3.0, so I just want to understand why I get the following problem with 4.3.3.

我有三个阶段.一个人坐在iframe文件中的一个容器中.其他的则位于iframe父文档的容器中,一个显示复杂的形状布局,另一个显示单个简单的形状以进行测试. iframe中控制所有操作的文档都有一个取景器覆盖层,可以正确拖放.但是,布局和测试阶段中的形状不会在mouseup上释放.

I have three stages. One sits in a container in a document in an iframe. The others sit in containers in the iframe's parent document, one displaying a complex layout of shapes and the other a single simple shape for testing. The document in the iframe which controls all the action has a viewfinder overlay that drags and drops correctly. However the shapes in the layout and test stages do not release on mouseup.

任何关于正在发生的事情的想法都将不胜感激……我想尝试保持最新状态.

Any idea about what's going on would be appreciated ... I like to try and keep up to date.

推荐答案

让我解释一下如何通过首先修改结构来找到答案.有一个包含共享文件和两个iframe的保留文件-一个用于类似机器的索引,一个用于显示,每个都有自己的脚本.主要共享文件是nameset.json,其中列出了所有对象及其键/值对.这些被发送以填充"机器和显示框架.我以为我可以对Kinetic Global对象做同样的事情,引用Global.stages数组.现在似乎很明显,每个iframe都需要自己的动力学链接(而不是指针),并且需要使用这些链接来与机器/显示器互动互动,例如此处显示的地图.无论如何,所有的拖放操作都可以顺利进行.谢谢你!

Let me explain how I found an answer by first amending the structure. There is a holding file which contains shared files and two iframes - one for a machine-like index and one for a display each with its own scripts. The main shared file is nameset.json which lists all the objects and their key/value couplets. These are sent to 'fill out' the machine and display frameworks. I thought I could do the same with the Kinetic Global object, referring to the Global.stages array. It seems obvious now that each of the iframes needs its own Kinetic link (rather than pointer) and these need to be used to marry machine/display interactions like the map shown here. Anyway all the dragging and dropping works smoothly as promoted. Thanks for that!

将标记为已回答,但是如果有人有任何评论,我们将很高兴阅读它们.

Will mark as answered but if anyone has any comments would be pleased to read them.

这篇关于动力学阻力与阻力放下-没有发布不一致的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆