-
-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moveable + Selecto: Dragging doesn't start sometime! #972
Comments
|
initMoveable: function () {
var me = this;
// Tooltip Label Element
me.elTooltipLabel = me.$canvasContainer.find(".tooltip-label");
// Width and Height of Container for Elements' Containment
me.canvasContainerWidth = me.$canvasContainer.outerWidth(true);
me.canvasContainerHeight = me.$canvasContainer.outerHeight(true);
var defaultCellHeightWidth = me.getCellHeightWidth();
me.objMoveable = new Moveable(me.canvasContainer, {
target: [],
hideChildMoveableDefaultLines: false, // To visulize all Elements within a Group
// Moveable will be updated when target's in inline style is detected!
//useMutationObserver: true,
//useResizeObserver: true,
// To Move
draggable: true,
dragTarget: ".sc-" + me.options.SmartCanvasID + " .dragHandle", // The target(s) to drag Moveable target(s). Currently setup with Custom Able DragHandleAble
// To Rotate
rotatable: true,
// To Rezie
resizable: true,
scalable: true,
// When resize or scale, keeps a ratio of the width, height
keepRatio: false,
// To Control CSS
className: "sc-edit-controls",
// Whether or not to show origin center in the controlbox
origin: false,
// May Be for Text: Add padding around the target to increase the drag area.
padding: {
left: 0,
top: 0,
right: 0,
bottom: 0
},
// ../moveable/issues/896
// For <input type="text"></input>
checkInput: false,
// For contenteditable="true"
dragFocusedInput: true,
// Custom Abilities
ables: [
DragHandleAble
],
props: {
draghandleable: true
},
// To Snap
snappable: true,
// Limit movement within the container
snapContainer: me.canvasContainer,
bounds: {
left: 0,
top: 0,
right: me.canvasContainerWidth,
bottom: me.canvasContainerHeight
},
// Snap to a Grid
snapDistFormat: (v, type) => `${v}px`,
verticalGuidelines: [
//me.canvasContainerWidth / 4, // 25%
//me.canvasContainerWidth / 2, // 50%
//me.canvasContainerWidth * 3 / 4 // 75%
],
horizontalGuidelines: [
//me.canvasContainerHeight / 4, // 25%
//me.canvasContainerHeight / 2, // 50%
//me.canvasContainerHeight * 3 / 4 // 75%
],
snapDigit: defaultCellHeightWidth.cellWidth,
snapThreshold: defaultCellHeightWidth.cellWidth, // Distance value that can snap to guidelines
snapGridWidth: defaultCellHeightWidth.cellWidth, // Grid Cell Width
snapGridHeight: defaultCellHeightWidth.cellHeight, // Grid Cell Height
snapDirections: {
left: true,
top: true,
right: true,
bottom: true,
center: true,
middle: true
},
isDisplaySnapDigit: true,
isDisplayInnerSnapDigit: true,
isDisplayGridGuidelines: false,
// Element Snap
snapElement: false,
snapGap: false, // ../moveable/issues/943: snapGap is an option that can be used with elementGuidelines. snapGap works when the same distance between elements is reached.
elementSnapDirections: false,
elementGuidelines: me.$canvasContainer.find(".el-wrapper").get(), //Add List of Element to enable Guidelines!
// Rotation Snap
rotationPosition: "bottom",
snapRotataionThreshold: 5,
snapRotationDegrees: [
0,
45,
90,
135,
180,
225,
270,
315
]
});
} |
Can you take a video while inspecting(dev tool) the elements of |
Hi @daybrush Here is the requested video! Recording.2023-07-06.190036.mp4 |
Oh right. If dragTarget is set, the target cannot be dragged. Do you want to set |
@daybrush That is correct. I would like to set The main reason I requested to have |
moveable's new version is released. Add Try set |
Hi @daybrush, I have updated my Project with the latest version of Moveable (0.51.0) and Selecto (1.26.0) and tried to implement For some reason, it is still not working as I expected. Here is the video after the updates. Recording.2023-07-10.181157.mp4 |
moveable's new version is released. Check it again. |
Hi @daybrush, It is working well now. Thank you so much for your rapid responses. 🙏 |
Environments
Description
I am facing an issue where dragging doesn't start something on an Element on a Click Event. But able to select and resize the element. The mouse cursor has a "not-allowed" icon as well. I am using Selecto for selection, my config is as follows:
Object Initialization
Event Callbacks!
I won't be able to provide a testable link, so I have included a video for you to refer to.
Recording.2023-07-06.124527.mp4
I would appreciate any help!
The text was updated successfully, but these errors were encountered: