Skip to content

Commit d69969d

Browse files
committed
fix: renamed loadConfig to setConfig
1 parent 7969319 commit d69969d

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/GEOComp.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ GEOComp = withMethodExposing(GEOComp, [
499499
},
500500
{
501501
method: {
502-
name: "loadConfig",
503-
description: "Load configuration the plugin by json",
502+
name: "setConfig",
503+
description: "Set configuration the plugin by json",
504504
params: [
505505
{
506506
name: "json",
@@ -526,14 +526,20 @@ GEOComp = withMethodExposing(GEOComp, [
526526
},
527527
{
528528
method: {
529-
name: "saveConfig",
530-
description: "Save configuration the plugin by json",
529+
name: "getConfig",
530+
description: "Get configuration the plugin by json",
531+
params: [
532+
{
533+
name: "asString",
534+
type: "boolean",
535+
}
536+
]
531537
},
532538
execute: (comp: any, params: any) => {
533539
const data = comp.toJsonValue();
534540
console.debug(JSON.stringify(data, null))
535541
//Event config needs to be added
536-
return JSON.stringify(data, null)
542+
return params[0] === true ? JSON.stringify(data, null) : data
537543
}
538544
},
539545
]);

0 commit comments

Comments
 (0)