From 1c7ee090105ff08f7dcfc3f2803bd0aa7a3f98b5 Mon Sep 17 00:00:00 2001 From: zsviczian Date: Fri, 3 Dec 2021 11:42:28 +0100 Subject: [PATCH] feat: support Image binding (#4347) --- src/element/typeChecks.ts | 1 + src/renderer/renderScene.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/element/typeChecks.ts b/src/element/typeChecks.ts index 8e634060..63cb0ec7 100644 --- a/src/element/typeChecks.ts +++ b/src/element/typeChecks.ts @@ -85,6 +85,7 @@ export const isBindableElement = ( (element.type === "rectangle" || element.type === "diamond" || element.type === "ellipse" || + element.type === "image" || element.type === "text") ); }; diff --git a/src/renderer/renderScene.ts b/src/renderer/renderScene.ts index 9fddadd7..7e47409f 100644 --- a/src/renderer/renderScene.ts +++ b/src/renderer/renderScene.ts @@ -683,6 +683,7 @@ const renderBindingHighlightForBindableElement = ( switch (element.type) { case "rectangle": case "text": + case "image": strokeRectWithRotation( context, x1 - padding,