Skip to content
Snippets Groups Projects
Commit 22bc2a79 authored by jojohoch's avatar jojohoch
Browse files

[editor] Send schemer variables on sendVoeDefinitionChangedNotification

parent 9c309b39
No related branches found
No related tags found
No related merge requests found
Pipeline #38782 passed
...@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core'; ...@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { fromEvent, Observable, Subject } from 'rxjs'; import { fromEvent, Observable, Subject } from 'rxjs';
import packageJSON from '../../../../../package.json'; import packageJSON from '../../../../../package.json';
import { Unit } from 'common/models/unit'; import { Unit } from 'common/models/unit';
import { SchemerData } from 'common/models/elements/element';
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
...@@ -34,7 +35,7 @@ export class VeronaAPIService { ...@@ -34,7 +35,7 @@ export class VeronaAPIService {
} }
} }
private send(message: Record<string, string>): void { private send(message: Record<string, string | SchemerData[]>): void {
// prevent posts in local (dev) mode // prevent posts in local (dev) mode
if (!this.isStandalone()) { if (!this.isStandalone()) {
window.parent.postMessage(message, '*'); window.parent.postMessage(message, '*');
...@@ -58,7 +59,8 @@ export class VeronaAPIService { ...@@ -58,7 +59,8 @@ export class VeronaAPIService {
sessionId: this.sessionID, sessionId: this.sessionID,
timeStamp: String(Date.now()), timeStamp: String(Date.now()),
unitDefinition: JSON.stringify(unit), unitDefinition: JSON.stringify(unit),
unitDefinitionType: `${unit.type}@${unit.version}` unitDefinitionType: `${unit.type}@${unit.version}`,
variables: unit.getSchemerData()
}); });
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment