File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
packages/adaptive-ui-designer-figma-plugin/src Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ import type { PluginMessage} from "../core/messages.js";
4
4
import { FigmaPluginNode } from "./node.js" ;
5
5
6
6
export class FigmaController extends Controller {
7
+ constructor ( ) {
8
+ super ( ) ;
9
+
10
+ // Ignore invisible nodes for performance by default. There is a setting in the UI to toggle this.
11
+ figma . skipInvisibleInstanceChildren = true ;
12
+ }
13
+
7
14
public async getNode ( id : string ) : Promise < FigmaPluginNode | null > {
8
15
const node = await figma . getNodeByIdAsync ( id ) ;
9
16
if ( node ) {
Original file line number Diff line number Diff line change @@ -4,10 +4,6 @@ import { FigmaController } from "./controller.js";
4
4
5
5
const controller = new FigmaController ( ) ;
6
6
7
- // Ignore invisible nodes for performance, which means if someone turns them back to visible they may need to run the plugin again.
8
- // Update: With a reasonable number of invisible nodes the speed is no longer intolerable. Better to make sure styling is current.
9
- // figma.skipInvisibleInstanceChildren = true;
10
-
11
7
figma . showUI ( __html__ , {
12
8
height : 600 ,
13
9
width : 356 ,
Original file line number Diff line number Diff line change @@ -653,7 +653,7 @@ export class App extends FASTElement {
653
653
}
654
654
655
655
@observable
656
- public skipInvisibleNodes : boolean = false ;
656
+ public skipInvisibleNodes : boolean = true ;
657
657
protected skipInvisibleNodesChanged ( prev : boolean , next : boolean ) {
658
658
const message : SkipInvisibleNodesMessage = {
659
659
type : "SKIP_INVISIBLE_NODES" ,
You can’t perform that action at this time.
0 commit comments