File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
src/packages/frontend/frame-editors Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ document.addEventListener("gestureend", handler);
43
43
44
44
export interface Data {
45
45
fontSize : number ;
46
+ first ?: boolean ;
46
47
}
47
48
48
49
const pinchMax = 1000 ;
@@ -70,9 +71,9 @@ export default function usePinchToZoom({
70
71
71
72
const saveThrottled = useMemo ( ( ) => {
72
73
if ( disabled ) return ( ) => { } ;
73
- return throttle ( ( fontSize , _first ) => {
74
+ return throttle ( ( fontSize , first ) => {
74
75
if ( onZoom != null ) {
75
- onZoom ( { fontSize } ) ;
76
+ onZoom ( { fontSize, first } ) ;
76
77
return ;
77
78
}
78
79
actions . set_font_size ( id , fontSize ) ;
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ import {
87
87
ScrollIntoViewRecord ,
88
88
} from "./types" ;
89
89
import { ensureTargetPathIsCorrect , pdf_path } from "./util" ;
90
+ import * as tree_ops from "../frame-tree/tree-ops" ;
90
91
91
92
interface LatexEditorState extends CodeEditorState {
92
93
build_logs : BuildLogs ;
@@ -1444,7 +1445,7 @@ export class Actions extends BaseActions<LatexEditorState> {
1444
1445
const tree = this . _get_tree ( ) ;
1445
1446
const leaf_ids = tree_ops . get_leaf_ids ( tree ) ;
1446
1447
1447
- for ( const id of leaf_ids ) {
1448
+ for ( const id in leaf_ids ) {
1448
1449
const node = tree_ops . get_node ( tree , id ) ;
1449
1450
if ( node && node . get ( "type" ) === type ) {
1450
1451
return id ;
Original file line number Diff line number Diff line change @@ -1277,7 +1277,7 @@ export default function Canvas({
1277
1277
}
1278
1278
1279
1279
if ( selectedTool == "pen" ) {
1280
- // mousePath is used for the actual path when creating the elemnts ,
1280
+ // mousePath is used for the actual path when creating the elements ,
1281
1281
// and is in data coordinates:
1282
1282
const point = getMousePos ( e ) ;
1283
1283
if ( point == null ) return ;
You can’t perform that action at this time.
0 commit comments