Hey, I want to use Dashboard Slider as brightness controller of my lamps but it generates too many messages while sliding and thus my Yeelight Bulbs block themselves for few minutes.
Is there a way to set a Slider so it only sends one message at mouse release? Colour pallet already has this option: send one value when released.
I have also tried a few different ways to throttle this flow but I always end up with the first message instead of the last one. Is there a way to collect all messages and if no new message is sent for a given time send the last from the array?
Another option would be to use the Dashboard template to create your own slider and use ng-mouseup to send the message so it will only output on release :
@dceejay Thank you, I have learned something new and it's my solution for now. @hugobox It's what I am looking for. Is there an easy way to set style to my dashboard's style? I have tried with different classes but it did not work.
looks like the md-slider md-discrete mode may do what we want.... will investigate (albeit the look changes slightly) (see Rating/5 section of the demos - https://material.angularjs.org/1.0.0/demo/slider )
I have just tested current master and it's not working for me. Changing output settings does not change the behaviour of the slider.
Can I somehow help with debugging it? I have checked the element with inspector and confirmed that md-discreate is there:
EDIT: It's working! Another cashing problem
EDIT2: It works both on PC and mobile, I like the popup and you made it so it fits to my dark theme. The only problem is that it sends a message on first click and at the end of dragging so there are 2 messages per one change. This is easy to fix in the flow without any delays so it basically fixed my problem, thank you!
Great - glad we got that sorted...
For me (on laptop with a mouse) it only send the one output in release. Maybe the touch library is slightly different ?
If I my press down is perfectly on the dot then it sends only one message but it's impossible to do with more steps (I am using over 100). Try starting a drag few steps away from the dot.
Could you also set .md-track-ticks colour to Widget Colour? It changes the colour of the whole track when it's focused:
I have discovered some behavior with slider that results in it NOT sending a message when the slider is released. It does affect a PC (W10, latest Chrome) with a mouse but a Android Tablet with Touch screen is not affected.
I noticed that with slider set to send "Only on Release" that some times it would not send the maximum and minimum values. It turned out that this is when the Mouse button is released when the pointer has moved further the the Left (min) or Right (Max) than the bubble on the slider indicator. If you return to the bubble and click it left (or Right for max) of centre then it does send it.
What is annoying that the slider gives the impression this is the new value when it has been sent but has not.
The Android touch screen is much more tolerant, you can drag you finger well beyond the slider limits and the max or min value message is sent.