Comments (5)
@reinierstam Can you share your codes? In my demo page, I did disable the directive.
from angular2-draggable.
<svg #circle class='draggable' [attr.height]="editingSize.height" [attr.width]="editingSize.width" [style.position]="'absolute'" [style.left]="xpos" [style.top]="ypos" ngDraggable=''false'' (click)="onDrag($event, sensor)"> <circle [popover]="myPopover" [popoverOnHover]="true" [attr.cx]="editingSize.cx" [attr.cy]="editingSize.cy" [attr.r]="editingSize.r" stroke="black" stroke-width="1" [attr.fill]="sensorStatusColor" /> </svg>
and i imported in my app.module.ts like this:
import { AngularDraggableModule } from 'angular2-draggable';
(and added it to the imports ofc).
from angular2-draggable.
@reinierstam OK, I know. You've set a string 'false' which is not a boolean value to ngDraggable.
from angular2-draggable.
<svg #circle class='draggable' [attr.height]="editingSize.height" [attr.width]="editingSize.width" [style.position]="'absolute'" [style.left]="xpos" [style.top]="ypos" ngDraggable="{{false}}" (click)="onDrag($event, sensor)"> <circle [popover]="myPopover" [popoverOnHover]="true" [attr.cx]="editingSize.cx" [attr.cy]="editingSize.cy" [attr.r]="editingSize.r" stroke="black" stroke-width="1" [attr.fill]="sensorStatusColor" /> </svg>
Your quotes are a bit confusing..
from angular2-draggable.
I had to use [ngDraggable]="booleanSetOnYourComponent"
to make it disable movement.
from angular2-draggable.
Related Issues (20)
- click event eaten by title attribute, when draggable
- Overlapping Draggable Element
- Draggable action for parent and child element
- click is not called only at first
- scaled parent bug on resizable HOT 2
- Drag and drop items using the library
- Angular10 support HOT 1
- Move with arrow keys feature
- Issue with ngDraggable boundsCheck() if out of bounds.
- Swapping elements
- my drag not showing resize handle HOT 2
- Draggable/Resizeable element moves off the position in Angular 10+
- [Easy] If position values are strings, draggable behavior is erratic
- Set movingOffset progmatically
- rzMaxHeight not working properly
- rzAspectRatio does not work on dynamically added div
- New Feature of showing smart guides and multiple drag
- New event rzBeforeStart is required
- Handle Size disrupting the element size when it has to be exact
- resizeable's w only style error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular2-draggable.