-
Notifications
You must be signed in to change notification settings - Fork 80
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
Angular2 drag event not working #42
Comments
I can't reproduce this issue in my Angular2 sample, maybe your application scenario was differ. So is there any possibilities to host in your in online and share me the link. Otherwise can you share the related information to make the similar sample in my side. However just let me know any of the way to reproduce that issue in my machine, so that i can provide a solution to resolve that... Thanks :) |
Hi soundar, thanks for your quick response. I have been able to resolve the issue by removing the default value ( To prevent this I created an ngAfterViewChecked() { However, now I have an issue with the tooltip, which keeps getting overridden by the changed value. Here's an example: http://g.recordit.co/v33x1ENNUm.gif. Don't mind the position of the tooltip, that still needs work, but upon dragging the slider and releasing the mouse button the slider's value is displayed. Clicking anywhere makes the original tooltip show again. Is there something in the library code that could do this? For the record: I would never like to display the selected value, always the description tooltip. |
From the code snippet and the example image, i can't find how you achieved this. I think you may did any sample level customization. But in the roundSlider itself, it has a property "tooltipFormat" to customize the tooltip format, so you can use that. Check the below demo and update me your comments: |
Yeah I know about the tooltipFormat property, but it seems Angular 2 is messing things up in the way it fires jQuery in a different sequence, or something like that. I'll keep messing around with it and let you know if I can work it out. |
Hey can you share your code with us? |
I'm trying to implement the roundSlider in an Angular 2 project which is causing me some headache. Please note that I'm a beginner in Angular 2 development.
Configuring and displaying the roundSliders is no problem, but modifying/dragging the value doesn't result in a front-end change.
Here's the current setup in the Angular 2 component:
ngAfterViewChecked() {
jQuery(this._elRef.nativeElement).find('.radial-slider').roundSlider(
{
sliderType: "min-range",
handleShape: "round",
width: "12",
radius: "60",
value: 0,
animation: false,
showTooltip: true,
editableTooltip: false,
readOnly: false,
disabled: false,
keyboardAction: true,
mouseScrollAction: false,
handleSize: "+17",
startAngle: 90,
drag: (event, ui) => {
console.log(event);
}
});
Upon dragging the handle the handle itself doesn't move, but looking in the console log you can see that it does seem to be doing something. Here's an example of the result of the drag event console log:
Object {value: 7, preValue: 0, handle: Object, options: Object, type: "drag"}
What would be the correct way of getting the changed value to actually modify the aria-valuenow and rotate() values so the roundSlider works as expected?
Looking forward to your feedback.
The text was updated successfully, but these errors were encountered: