-
Notifications
You must be signed in to change notification settings - Fork 786
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
restrictSize and restrictEdges doesnt work (not in index.d.ts) (Angular6) #647
Comments
Just to mentioned, i've fixed it to use the not defined types: maybe you want to use the code: `` declare namespace interact { interface SnapPosition { interface Rect { interface Rect2 { interface SnapFunction { type SnapTarget = SnapPosition | SnapFunction interface InertiaOption { interface AutoScrollOption { type CSSSelector = string type RestrictOption = { interface EdgeOptions { interface DraggableOptions { interface ResizableOptions {
} interface GesturableOptions { interface DropFunctionChecker { interface DropZoneOptions {
} interface InteractEvent { interface Listener { type OnEventName = interface OnEventFunctions { type OnEvent = OnEventName | OnEventName[] interface Interactable { interface InteractOptions { interface InteractStatic { declare var interact:interact.InteractStatic; |
Duplicate of #623 |
Hello I come up with this error while integrating Interactjs in an modern angular6 application.
.resizable({
restrictSize: { /* restrict options / }
restrictEdges: { / restrict options */ }
});
Wont work because they're not in the index.ds.ts
Sample code:
`
this.dragzone = interact('.draggable')
.draggable({
autoScroll: true,
onmove: this.interactDragMoveListener,
restrict: {
restriction: 'parent',
elementRect: { top: 0, left: 0, bottom: 1, right: 1 }
}
})
.resizable({
restrictEdges: {
outer: 'parent',
endOnly: true
},
restrictSize: {
min: { width: 100, height: 120 }
},
onmove: this.interactResizeListener,
edges: { left: true, right: true, bottom: true, top: true },
inertia: true
},
);
`
Error output:
Thank you for your support
The text was updated successfully, but these errors were encountered: