Skip to content

Commit

Permalink
refactor: use init method
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelass committed Jul 30, 2023
1 parent 4e326dd commit 96756be
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extensions/connectionsWidth.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const connectionsWidthName = "Failfast.connectionsWidth";

app.registerExtension({
name: connectionsWidthName,
async setup(app) {
async init(app) {
app.ui.settings.addSetting({
id: connectionsWidthName,
name: "Connectors Width",
Expand Down
2 changes: 1 addition & 1 deletion extensions/forceBoxNodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const forceBoxName = "Failfast.forceBoxNodes";

app.registerExtension({
name: forceBoxName,
async setup(app) {
async init(app) {
app.ui.settings.addSetting({
id: forceBoxName,
name: "Force Box Nodes",
Expand Down
2 changes: 1 addition & 1 deletion extensions/forceSnapToGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const forceSnapToGridName = "Failfast.forceSnapToGrid";

app.registerExtension({
name: forceSnapToGridName,
async setup(app) {
async init(app) {
app.ui.settings.addSetting({
id: forceSnapToGridName,
name: "Force Snap to Grid",
Expand Down
2 changes: 1 addition & 1 deletion extensions/linksRenderMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const renderModes = ["straight", "small curve", "curve"];

app.registerExtension({
name: linksRenderModeName,
async setup(app) {
async init(app) {
app.ui.settings.addSetting({
id: linksRenderModeName,
name: "Links Render Mode",
Expand Down
6 changes: 3 additions & 3 deletions extensions/pinNodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const pinNodesName = "Failfast.pinNodes";

app.registerExtension({
name: pinNodesName,
async setup(app) {
async init(app) {
const pinButton = $el(
"button",
{
onClick() {
onclick() {
app.graph._nodes.forEach((node) => {
node.flags.pinned = true;
});
Expand All @@ -35,7 +35,7 @@ app.registerExtension({
const unpinButton = $el(
"button",
{
onClick() {
onclick() {
app.graph._nodes.forEach((node) => {
node.flags.pinned = false;
});
Expand Down
2 changes: 1 addition & 1 deletion extensions/renderShadows.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const renderShadowsName = "Failfast.renderShadows";

app.registerExtension({
name: renderShadowsName,
async setup(app) {
async init(app) {
app.ui.settings.addSetting({
id: renderShadowsName,
name: "Render Node shadows",
Expand Down

0 comments on commit 96756be

Please sign in to comment.