kopia lustrzana https://github.com/Tldraw/Tldraw
Revert.
rodzic
c22d224929
commit
d16b305d68
|
@ -34,19 +34,21 @@ export class Pointing extends StateNode {
|
||||||
|
|
||||||
this.editor.mark(this.markId)
|
this.editor.mark(this.markId)
|
||||||
|
|
||||||
this.editor.createShapes<TLBaseBoxShape>([
|
this.editor
|
||||||
{
|
.createShapes<TLBaseBoxShape>([
|
||||||
id,
|
{
|
||||||
type: shapeType,
|
id,
|
||||||
x: originPagePoint.x,
|
type: shapeType,
|
||||||
y: originPagePoint.y,
|
x: originPagePoint.x,
|
||||||
props: {
|
y: originPagePoint.y,
|
||||||
w: 1,
|
props: {
|
||||||
h: 1,
|
w: 1,
|
||||||
|
h: 1,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
])
|
||||||
])
|
.select(id)
|
||||||
this.editor.select(id)
|
|
||||||
this.editor.setCurrentTool('select.resizing', {
|
this.editor.setCurrentTool('select.resizing', {
|
||||||
...info,
|
...info,
|
||||||
target: 'selection',
|
target: 'selection',
|
||||||
|
|
|
@ -107,15 +107,16 @@ export class Pointing extends StateNode {
|
||||||
this.markId = `creating:${id}`
|
this.markId = `creating:${id}`
|
||||||
this.editor.mark(this.markId)
|
this.editor.mark(this.markId)
|
||||||
|
|
||||||
this.editor.createShapes([
|
this.editor
|
||||||
{
|
.createShapes([
|
||||||
id,
|
{
|
||||||
type: 'note',
|
id,
|
||||||
x: originPagePoint.x,
|
type: 'note',
|
||||||
y: originPagePoint.y,
|
x: originPagePoint.x,
|
||||||
},
|
y: originPagePoint.y,
|
||||||
])
|
},
|
||||||
this.editor.select(id)
|
])
|
||||||
|
.select(id)
|
||||||
|
|
||||||
const shape = this.editor.getShape<TLNoteShape>(id)!
|
const shape = this.editor.getShape<TLNoteShape>(id)!
|
||||||
const bounds = this.editor.getShapeGeometry(shape).bounds
|
const bounds = this.editor.getShapeGeometry(shape).bounds
|
||||||
|
|
Ładowanie…
Reference in New Issue