Dnd-kit Multiple containers: items jump disorderly after quick drag and drops - drag-and-drop

As seen in the attached video clip, I can move the items in container A to B without any problem. But if the speed of my drag increase, the list in the over container starts to behave abnormally. I tried the example multi container story but didn't capture this type of behavior.
Once the list items start to jump all over the place, if click on an item, it immediately switch place with another one, as the argument {over} is now not itself even in dragStart.
Sandbox: https://codesandbox.io/s/eloquent-kirch-t9r13j?file=/Dnd.js
Video: https://user-images.githubusercontent.com/83575213/170879626-de413f22-1236-4128-baec-c95363e61b47.mp4
Really appreciate any helps. Cheers

Apparently it was the issue from the dnd-kit library at version 6.0.6 or lower.
However this issue has been fixed in v6.0.7, you can see the PR here: https://github.com/clauderic/dnd-kit/pull/788

I had the same issue, it was the problem with arrays not updating after drag end. Dnd navigates by keys and it looks like there are more than 1 element with the same key in one array, that's why it is grabbing 2 elements at ones.

Related

Mouse is offset only in one particular GUI in Unity

I have 3 different GUI containers/sections, one for showing resources, one for building, and one for inventory. Clicking anything in the resource and building sections works completely fine, the mouse is where it needs to be and clicking/hovering over a button will actually click/hover over the button.
The problem is only in the inventory GUI. I'm not sure how it's any different, so I don't know what I need to provide here for anyone to help me out, so please ask me for any extra info if you need it in the comments. I'm not sure if this is an issue with the code or the UI elements, or whatever else it might be. I'm going to provide some examples of this happening, though.
Here is a gif of what it looks like in the inventory (ignore the items not doing what they are supposed to): https://s3.gifyu.com/images/ezgif.com-gif-maker-37b00e5b2a1c164b2.gif
Here is a gift of me just hovering/clicking around in the inventory: https://s3.gifyu.com/images/ezgif.com-gif-maker97b27b8783d784c6.gif
Here is a gif of this working in the "Building" section: https://s9.gifyu.com/images/ezgif.com-gif-maker-287d7a9723f9db2b1.gif
Here is a gif of this working in the "Resources" section: https://s3.gifyu.com/images/ezgif.com-gif-maker-18662e4229ebd27a2.gif
Here are some images that might be useful. Here is the layout:
There is no difference when I select, for example, Building and Inventory. Here is a comparison:
I have looked around on Google for about 30 minutes, but I couldn't find anything related to this.
I have found the issue. The issue was with the slot prefab that was in the inventory screen, as it had text that was way bigger than it was: https://prnt.sc/uDRXz2Kr4kQr
I initially hadn't noticed this as simply clicking on the prefab itself shows that it's the right size: https://prnt.sc/BXQqAzMD-kWX
Resizing the text seems to fix the issue.

Hololens 2/Unity Error: A material (Instance)(Instance)... which is already instanced was instanced multiple times

I have instanced a simple scrolling menu prefab in my scene (prefab provided by MRTK2 with just one menu option available). I have a button in the scene that when clicked will either SetActive(true) or SetActive(false) on this menu to show/hide it. When the menu is SetActive(false) and then SetActive(true) it provides the sequence of errors depicted in the picture below. I've found this thread that may be related but ultimately I don't know what this error means or how to fix it.
It seems that all of these errors are w.r.t. components on objects in the menu that existed from the prefab, so I'm confused as to why these errors are happening. I tried to replace the components with their MRTK counterparts as I was reading somewhere that MRTK versions of shaders, etc. are more efficient and was hoping that maybe they would simply solve the issue (they haven't).
For example, it seems that the error regarding MRTK_PressableInteractablesButtonBox (Instance) (Instance) is the shader on the FrontPlate of the button in the menu option.
Similarly, the error regarding sequisb SDF Material (Instance) (Instance) is the FontAsset on the TextMeshPro under the menu option's IconAndText object.
Unfortunately, my solution doesn't provide an explanation as to what caused my original error. However, I was able to get everything working by simply scrapping the old menu and recreating from the same prefab. I guess cross-wiring must have occurred at some point that I was unable to trace down. Ultimately, all I needed was a scrollable menu with a click event listener and buttons with custom meshes...all of which seem to be working fine now.
Thanks to #Zuocheng Wang and #derHugo for pointing me in the right direction (i.e. that things "should" work essentially out-of-box for the desired functionality).

eclipse RCP4 Add Toolbar to Parts

How to model a toolbar ONCE and render it in some Parts/Views (not in the default place which is the window!)? Using the model level (and maybe Addons?)
I have currently
Eclipse 2022.03-4.23
Application.e4xmi with that Toolbar but
Gets added dynamically using an Addon that listens to "PART_ADDED" event topic which
Leads to a NPE due to other event topic "UIEvents.Part.TOPIC_TOOLBAR" within a framework method in a class called LazyStackRenderer
So the guy before me had written an Addon to dynamically add the Toolbar to the parts. Maybe to make the buttons save/print per part or because the main layout has two stacks and only the parts stack is relevant.
Appreciate any help! I searched a lot but no success!
I solved it so far. The dynamically created MParts were not added as children to the container (in my case the PartStack) in the first place and also had to comment the adding of placeholder objects that carry the same information of the parts. This dynamic step was done as a reaction to the topic #UIEventTopic(UIEvents.UILifeCycle.APP_STARTUP_COMPLETE) in some written Addon.
I am not a 100% sure that discarding the placeholders is safe but still this is the best trail I have ever reached.
I hope this would help others!
Thank you #greg-449

Why aren't UIViewAnimationsOptions available in the drop down menu?

I'm working through the Code With Chris card matching game and when setting up the animation, he presses "." to bring up a list of options to select from. When I do the same thing my list of things to select from is different. I tried putting in the text manually but Xcode doesn't recognize it. What am I doing incorrectly?
Because the tutorial is calling UIView.animate but you are calling UIView.animateKeyFrames. Those are different methods and take a different set of options.
(There have also been some changes in the code completion interface since that tutorial was created.)

kineticjs drag & drop - no release inconsistency

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.
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.
Well, since I can't see any of your code I can only help so much, try doing the following.
For each shape that you have, add this attribute:
dragOnTop: false
example:
Kinetic.Rect({
fill: 'blue',
dragOnTop: false
});
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.