(h1, h2, level, disabled, annotation)
| 168 | raph.clear(); |
| 169 | |
| 170 | function makePathForHandles(h1, h2, level, disabled, annotation) { |
| 171 | var f = findPathForLines(h1, h2); |
| 172 | if (f) { |
| 173 | f.disabled=disabled; |
| 174 | f.annotation = annotation; |
| 175 | if (f.t) |
| 176 | f.t.remove(); |
| 177 | |
| 178 | // var r1 = rectForLineHandle(h1); |
| 179 | // var r2 = rectForLineHandle(h2); |
| 180 | // var t = raph.text(5, (r1.top+r2.bottom)/2, annotation="PEACH") |
| 181 | // t.attr({"text-align":"right"}); |
| 182 | // t.attr({"fill":"#bbb"}); |
| 183 | // t.attr({"fill-opacity":0.3}); |
| 184 | // f.annotation = annotation; |
| 185 | // t.isHandleAnnotation = 1; |
| 186 | // f.t = t; |
| 187 | |
| 188 | return f; |
| 189 | } |
| 190 | |
| 191 | ps = pathStringForTwoLineHandles(h1, h2, level); |
| 192 | if (ps) { |
| 193 | var path = raph.path(); |
| 194 | path.attr({ |
| 195 | "stroke-opacity": 0. |
| 196 | }); |
| 197 | path.attr({ |
| 198 | fill: "#405560" |
| 199 | //fill:"45-#fff-#fff:0-#000:0-#000:10-#fff:10-#fff:20-#000:20-#000:30-#fff:30-#fff:40-#000:40-#000:50-#fff:50-#fff:60-#000:60-#000:70-#fff:70-#fff:80-#000:80-#000:90-#fff:90" |
| 200 | }); |
| 201 | path.attr({ |
| 202 | stroke: "#000" |
| 203 | }); |
| 204 | path.attr({ |
| 205 | opacity: 0.4 |
| 206 | }); |
| 207 | path.attr({ |
| 208 | "stroke-width": 2.0 |
| 209 | }); |
| 210 | path.attr({ |
| 211 | path: ps |
| 212 | }); |
| 213 | |
| 214 | |
| 215 | path.attr({"stroke-dasharray": (disabled ? "- " : "")}); |
| 216 | path.attr({"fill-opacity": (disabled ? 0.2 : 0.9)}); |
| 217 | path.attr({"stroke": (disabled ? "#fff" : "#000")}); |
| 218 | |
| 219 | path.mouseover(function () { |
| 220 | path.attr({ |
| 221 | "stroke-opacity": 1.0 |
| 222 | }) |
| 223 | }); |
| 224 | |
| 225 | path.mouseout(function () { |
| 226 | path.attr({ |
| 227 | "stroke-opacity": 0. |
no test coverage detected