| 274 | } |
| 275 | |
| 276 | |
| 277 | public Function<Box, FLine> connective() { |
| 278 | TextEditor t = inside.find(TextEditor.textEditor, inside.both()) |
| 279 | .findFirst() |
| 280 | .get(); |
| 281 | |
| 282 | return (x) -> { |
| 283 | |
| 284 | if (editorPosition == null) return new FLine(); // check current editable |
| 285 | |
| 286 | |
| 287 | Rect f0 = t.browser_.properties.get(Box.frame) |
| 288 | .duplicate(); |
| 289 | Rect f1 = target.properties.get(Box.frame); |
| 290 | |
| 291 | f0.x += editorPosition.x; |
| 292 | f0.y += editorPosition.y; |
| 293 | |
| 294 | |
| 295 | f0 = f0.inset(5); |
| 296 | f1 = f1.inset(5); |
| 297 | |
| 298 | |
| 299 | FLine f = new FLine(); |
| 300 | |
| 301 | f.moveTo(f0.x, f0.y); |
| 302 | f.lineTo(f1.x, f1.y); |
| 303 | f.moveTo(f0.x + editorPosition.w, f0.y); |
| 304 | f.lineTo(f1.x + f1.w, f1.y); |
| 305 | f.moveTo(f0.x + editorPosition.w, f0.y + editorPosition.h); |
| 306 | f.lineTo(f1.x + f1.w, f1.y + f1.h); |
| 307 | f.moveTo(f0.x, f0.y + editorPosition.h); |
| 308 | f.lineTo(f1.x, f1.y + f1.h); |
| 309 | |
| 310 | f.attributes.put(StandardFLineDrawing.color, new Vec4(0, 0, 0, 0.1)); |
| 311 | |
| 312 | return f; |
| 313 | |
| 314 | |
| 315 | }; |
| 316 | } |
| 317 | |
| 318 | |