mirror of
https://github.com/logseq/logseq.git
synced 2026-06-02 11:21:22 +00:00
fix: build issue
This commit is contained in:
@@ -61,10 +61,11 @@ export class HTMLShape extends TLBoxShape<HTMLShapeProps> {
|
||||
|
||||
onResetBounds = (info?: TLResetBoundsInfo) => {
|
||||
if (this.htmlAnchorRef.current) {
|
||||
const rect = this.htmlAnchorRef.current.getBoundingClientRect()
|
||||
this.update({
|
||||
size: [
|
||||
this.props.size[0],
|
||||
Math.max(Math.min(this.htmlAnchorRef.current.offsetHeight || 400, 800), 10),
|
||||
Math.max(Math.min(rect.width || 400, 800), 10),
|
||||
Math.max(Math.min(rect.height || 400, 800), 10),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
@@ -642,6 +642,10 @@ button.tl-select-input-trigger {
|
||||
transform-origin: top left;
|
||||
}
|
||||
|
||||
.tl-html-anchor {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.tl-html-anchor > iframe {
|
||||
@apply h-full w-full !important;
|
||||
margin: 0;
|
||||
|
||||
@@ -38,7 +38,7 @@ export class TLImageShape<
|
||||
assetId: '',
|
||||
}
|
||||
|
||||
autoResize = (info: TLResetBoundsInfo<TLImageAsset>) => {
|
||||
onResetBounds: (info?: TLResetBoundsInfo | undefined) => this = (info: any) => {
|
||||
const { clipping, size, point } = this.props
|
||||
if (clipping) {
|
||||
const [t, r, b, l] = Array.isArray(clipping)
|
||||
|
||||
@@ -77,7 +77,7 @@ export class HoveringSelectionHandleState<
|
||||
break
|
||||
}
|
||||
case TLTargetType.Selection: {
|
||||
selectedShape.autoResize?.({})
|
||||
selectedShape.onResetBounds?.({})
|
||||
if (this.app.selectedShapesArray.length === 1) {
|
||||
this.tool.transition('editingShape', {
|
||||
type: TLTargetType.Shape,
|
||||
@@ -91,7 +91,7 @@ export class HoveringSelectionHandleState<
|
||||
const asset = selectedShape.props.assetId
|
||||
? this.app.assets[selectedShape.props.assetId]
|
||||
: undefined
|
||||
selectedShape.autoResize({ asset })
|
||||
selectedShape.onResetBounds({ asset })
|
||||
this.tool.transition('idle')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user