mitja/2000-shapes-fixes
Mitja Bezenšek 2024-04-12 16:32:29 +02:00
rodzic c22d224929
commit d16b305d68
2 zmienionych plików z 24 dodań i 21 usunięć

Wyświetl plik

@ -34,19 +34,21 @@ export class Pointing extends StateNode {
this.editor.mark(this.markId)
this.editor.createShapes<TLBaseBoxShape>([
{
id,
type: shapeType,
x: originPagePoint.x,
y: originPagePoint.y,
props: {
w: 1,
h: 1,
this.editor
.createShapes<TLBaseBoxShape>([
{
id,
type: shapeType,
x: originPagePoint.x,
y: originPagePoint.y,
props: {
w: 1,
h: 1,
},
},
},
])
this.editor.select(id)
])
.select(id)
this.editor.setCurrentTool('select.resizing', {
...info,
target: 'selection',

Wyświetl plik

@ -107,15 +107,16 @@ export class Pointing extends StateNode {
this.markId = `creating:${id}`
this.editor.mark(this.markId)
this.editor.createShapes([
{
id,
type: 'note',
x: originPagePoint.x,
y: originPagePoint.y,
},
])
this.editor.select(id)
this.editor
.createShapes([
{
id,
type: 'note',
x: originPagePoint.x,
y: originPagePoint.y,
},
])
.select(id)
const shape = this.editor.getShape<TLNoteShape>(id)!
const bounds = this.editor.getShapeGeometry(shape).bounds