drag-and-drop

Custom View for UICollectionViewCell Drag Preview

六眼飞鱼酱① 提交于 2020-12-30 00:29:59
问题 I'm trying to implement a feature where by a user drags and drops one collectionview cell onto another. However, I want to change the preview of the thing in motion completely, as to match the visual metaphor of my app (the item isn't moving, something the item contains is moving). For example, say my collectionview cell shows a pen of pigs, and I want to to let the pig move from one pen to another, the preview view should be a view showing a single, not the pen. Its a slightly different use

Custom View for UICollectionViewCell Drag Preview

白昼怎懂夜的黑 提交于 2020-12-30 00:09:01
问题 I'm trying to implement a feature where by a user drags and drops one collectionview cell onto another. However, I want to change the preview of the thing in motion completely, as to match the visual metaphor of my app (the item isn't moving, something the item contains is moving). For example, say my collectionview cell shows a pen of pigs, and I want to to let the pig move from one pen to another, the preview view should be a view showing a single, not the pen. Its a slightly different use

Custom View for UICollectionViewCell Drag Preview

泄露秘密 提交于 2020-12-30 00:03:32
问题 I'm trying to implement a feature where by a user drags and drops one collectionview cell onto another. However, I want to change the preview of the thing in motion completely, as to match the visual metaphor of my app (the item isn't moving, something the item contains is moving). For example, say my collectionview cell shows a pen of pigs, and I want to to let the pig move from one pen to another, the preview view should be a view showing a single, not the pen. Its a slightly different use

Custom View for UICollectionViewCell Drag Preview

邮差的信 提交于 2020-12-29 23:46:34
问题 I'm trying to implement a feature where by a user drags and drops one collectionview cell onto another. However, I want to change the preview of the thing in motion completely, as to match the visual metaphor of my app (the item isn't moving, something the item contains is moving). For example, say my collectionview cell shows a pen of pigs, and I want to to let the pig move from one pen to another, the preview view should be a view showing a single, not the pen. Its a slightly different use

Custom View for UICollectionViewCell Drag Preview

大城市里の小女人 提交于 2020-12-29 23:43:23
问题 I'm trying to implement a feature where by a user drags and drops one collectionview cell onto another. However, I want to change the preview of the thing in motion completely, as to match the visual metaphor of my app (the item isn't moving, something the item contains is moving). For example, say my collectionview cell shows a pen of pigs, and I want to to let the pig move from one pen to another, the preview view should be a view showing a single, not the pen. Its a slightly different use

Custom View for UICollectionViewCell Drag Preview

好久不见. 提交于 2020-12-29 23:37:24
问题 I'm trying to implement a feature where by a user drags and drops one collectionview cell onto another. However, I want to change the preview of the thing in motion completely, as to match the visual metaphor of my app (the item isn't moving, something the item contains is moving). For example, say my collectionview cell shows a pen of pigs, and I want to to let the pig move from one pen to another, the preview view should be a view showing a single, not the pen. Its a slightly different use

Is there a way in JavaScript to detect if files can be dropped on the used device?

一个人想着一个人 提交于 2020-12-27 06:51:42
问题 I created a form on a website that allows users to upload files. Users can also drag and drop files onto this form. However, on some devices, it is simply not possible to drag and drop files (e.g. on my iPhone). So I only want to display the text "Drag and drop files here" only on devices on which it makes sense. Is there a way to detect whether the device supports drag and drop files in principle? A workaround could be to detect if a mouse pointer is moving. In this case, I would guess it is

Drag and drop with pinch zoom doesn't work as expected

半世苍凉 提交于 2020-12-16 04:37:41
问题 In the zoomed mode for pinch-zoom the drag doesn't align properly with the mouse pointer. I've detailed the problem here:https://stackblitz.com/edit/angular-t7hwqg I expect the drag to work same way irrespective of the zoom. I saw in version 8 of angular material they have added @Input('cdkDragConstrainPosition') constrainPosition: (point: Point, dragRef: DragRef) => Point, which will solve my problem as in the zoomed mode I can write a custom logic to map the drag properly with pointer, but

Drag and drop with pinch zoom doesn't work as expected

扶醉桌前 提交于 2020-12-16 04:37:35
问题 In the zoomed mode for pinch-zoom the drag doesn't align properly with the mouse pointer. I've detailed the problem here:https://stackblitz.com/edit/angular-t7hwqg I expect the drag to work same way irrespective of the zoom. I saw in version 8 of angular material they have added @Input('cdkDragConstrainPosition') constrainPosition: (point: Point, dragRef: DragRef) => Point, which will solve my problem as in the zoomed mode I can write a custom logic to map the drag properly with pointer, but

How to use Angular's Drag and Drop module to drag an element onto another?

夙愿已清 提交于 2020-12-15 05:34:59
问题 I cannot figure out how to use Angular's Drag and Drop module for something other than move items between lists. I have a list of items and I want to drag them on individual groups. Incidentally, there are two lists involved here, one list with groups and one list with items. Here's the template code (please see this https://stackblitz.com/edit/angular-xp4um9 for the full code): <div class="container"> <div class="drop-target"> <mat-selection-list cdkDropList #dropTarget="cdkDropList"