summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-09-01 00:00:22 +0200
committerPatrick Simianer <p@simianer.de>2015-09-01 00:00:22 +0200
commit7fa4a3574c40da4289196a0aaf8a11cd9ba4a1ae (patch)
tree9667c8c2cf3471052356a80e1e0d709cea0af490
parentd35b0b07fc95271965ed22f5b558e6edaf70ba1b (diff)
eye candy
-rw-r--r--r.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/r.js b/r.js
index 88fc392..ec67b05 100644
--- a/r.js
+++ b/r.js
@@ -218,7 +218,6 @@ snap_to_grid = function (anim=false)
}
att = { x:d };
if (anim) {
- //obj.animate(att,250);
obj.attr(att);
} else {
obj.attr(att);
@@ -226,7 +225,6 @@ snap_to_grid = function (anim=false)
att = { x: obj.getBBox().x+padding };
if (anim) {
obj.pair.animate(att,125);
- //obj.pair.attr(att);
} else {
obj.pair.attr(att);
}
@@ -324,11 +322,11 @@ var make_obj = function(x, text, type)
if (connect_mode) {
if (this != connect_mode_shape)
return;
- this.attr({"fill-opacity": 0});
+ this.animate({"fill-opacity": 0}, 250);
connect_mode = false;
connect_mode_shape = null;
} else {
- this.attr({"fill-opacity": .5});
+ this.animate({"fill-opacity": .5}, 250);
connect_mode = true;
connect_mode_shape = this;
}
@@ -391,7 +389,7 @@ window.onload = function ()
+(Math.max(c,d)*font_width),
paper_height = ybegin+2*box_height+line_margin;
r.setSize(paper_width, paper_height);
- rm_shape = r.rect(5, line_margin+ybegin, 50, box_height).attr({"fill":"red","stroke":0});
+ rm_shape = r.rect(5, line_margin+ybegin, 50, box_height).attr({"fill":"#fff","stroke":0}).animate({"fill":"red"}, 1000);
rm_shape.toBack();
rm_shape["rm_shape"] = true;
// source objs