Commit c3801265 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

try replacing css animation with web animation API (this will be more flexible...

try replacing css animation with web animation API (this will be more flexible once we pull the xlet highlighting logic out of the c code)
parent 16cde879
...@@ -1423,14 +1423,31 @@ function gui_configure_io(cid, tag, is_iemgui, is_signal, width) { ...@@ -1423,14 +1423,31 @@ function gui_configure_io(cid, tag, is_iemgui, is_signal, width) {
} }
// remove xlet_selected tag // remove xlet_selected tag
xlet.classList.remove("xlet_selected"); xlet.classList.remove("xlet_selected");
if (xlet_anim) {
xlet_anim.cancel();
}
} }
} }
var xlet_anim;
function gui_highlight_io(cid, tag) { function gui_highlight_io(cid, tag) {
var xlet = get_item(cid, tag); var xlet = get_item(cid, tag);
// must check for null (see gui_configure_io) // must check for null (see gui_configure_io)
if (xlet !== null) { if (xlet !== null) {
xlet.classList.add("xlet_selected"); xlet.classList.add("xlet_selected");
if (!xlet_anim || xlet_anim.playState === "finished" ||
xlet_anim.playState === "idle") {
xlet_anim = xlet.animate(
[{"stroke-width":"3"},
{"stroke-width":"7"},
{"stroke-width":"3"},
],
{ duration: 400,
delay: 45,
iterations: Infinity,
easing: "ease-in-out" }
);
}
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment