aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-03-31 23:16:24 -0400
committerbobzel <zzzman@gmail.com>2025-03-31 23:16:24 -0400
commit960357bce915d1b8246d2291fd82fbebcf6cd769 (patch)
tree678f716cb3590f5adb750dd5e034e47b7be413a7
parentf061db01d1936bf3e776b140786ba3bf1c6b71f3 (diff)
fixed zooming on image boxes with fades. fixed style ref for image regen to use self las, after links.
-rw-r--r--src/client/views/nodes/ImageBox.tsx4
-rw-r--r--src/client/views/smartdraw/DrawingFillHandler.tsx1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 030473be4..dc4b79983 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -650,7 +650,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
onClick={action(async () => {
this._regenerateLoading = true;
if (this._fireflyRefStrength) {
- DrawingFillHandler.drawingToImage(this.Document, this._fireflyRefStrength, this._regenInput || StrCast(this.Document.title), this.Document)?.then(action(() => (this._regenerateLoading = false)));
+ DrawingFillHandler.drawingToImage(this.Document, this._fireflyRefStrength, this._regenInput || StrCast(this.Document.title))?.then(action(() => (this._regenerateLoading = false)));
} else {
SmartDrawHandler.Instance.regenerate([this.Document], undefined, undefined, this._regenInput || StrCast(this.Document.title), true).then(
action(newImgs => {
@@ -772,7 +772,7 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
<CollectionFreeFormView
ref={this._ffref}
{...this._props}
- Document={doc}
+ Document={this.Document}
setContentViewBox={emptyFunction}
NativeWidth={returnZero}
NativeHeight={returnZero}
diff --git a/src/client/views/smartdraw/DrawingFillHandler.tsx b/src/client/views/smartdraw/DrawingFillHandler.tsx
index 328bf3487..d8ef8308d 100644
--- a/src/client/views/smartdraw/DrawingFillHandler.tsx
+++ b/src/client/views/smartdraw/DrawingFillHandler.tsx
@@ -17,6 +17,7 @@ export class DrawingFillHandler {
const tags = StrListCast(drawing.$tags).map(tag => tag.slice(1));
const styles = tags.filter(tag => FireflyStylePresets.has(tag));
const styleDocs = [drawing].concat(
+ drawing,
...Doc.Links(drawing)
.map(link => Doc.getOppositeAnchor(link, drawing))
.map(anchor => DocCast(anchor?.annotationOn, anchor))