feat(renderer): enhance image rendering with asset synchronization and clipping
This commit is contained in:
@@ -41,13 +41,14 @@ describe("transform controls input", () => {
|
||||
});
|
||||
|
||||
expect(controller.pointerDown(pointerEvent({ position: { x: 100, y: 100 }, buttons: 1 }))).toBe(true);
|
||||
expect(controller.pointerMove(pointerEvent({ position: { x: 110, y: 120 }, buttons: 1 }))).toBe(true);
|
||||
expect(controller.pointerMove(pointerEvent({ position: { x: 110, y: 120 }, buttons: 1, shiftKey: true }))).toBe(true);
|
||||
expect(controller.pointerUp(pointerEvent({ position: { x: 110, y: 120 }, buttons: 0 }))).toBe(true);
|
||||
expect(dispatched.map((event) => (event as { commandId: string }).commandId)).toEqual([
|
||||
commandIds.transformBegin,
|
||||
commandIds.transformUpdate,
|
||||
commandIds.transformEnd,
|
||||
]);
|
||||
expect((dispatched[1] as { payload: { shiftKey: boolean } }).payload.shiftKey).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export function createTransformControlsInputController(options: {
|
||||
const editor = options.getEditor();
|
||||
if (!editor.transformSession) return false;
|
||||
|
||||
options.dispatch(commandIds.transformUpdate, { point: viewportPointToDocumentPoint(event.position, editor.viewport) });
|
||||
options.dispatch(commandIds.transformUpdate, { point: viewportPointToDocumentPoint(event.position, editor.viewport), shiftKey: event.shiftKey });
|
||||
return true;
|
||||
},
|
||||
pointerUp() {
|
||||
|
||||
Reference in New Issue
Block a user