Remove deprecated function to SmartComponent
This commit is contained in:
parent
444b96736a
commit
a718268972
1 changed files with 0 additions and 18 deletions
|
@ -3,28 +3,10 @@
|
||||||
|
|
||||||
public constructor(componentInfo: KnockoutComponentTypes.ComponentInfo, params: any) {
|
public constructor(componentInfo: KnockoutComponentTypes.ComponentInfo, params: any) {
|
||||||
super(componentInfo, params);
|
super(componentInfo, params);
|
||||||
// this.$component.id = SVGLayoutDesigner.generateUUID();
|
|
||||||
setTimeout(() => (window as any).SVGLayoutDesigner.Render(this.$component[0]));
|
setTimeout(() => (window as any).SVGLayoutDesigner.Render(this.$component[0]));
|
||||||
this.InitEventsListener();
|
this.InitEventsListener();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static generateUUID() { // Public Domain/MIT
|
|
||||||
let d = new Date().getTime();//Timestamp
|
|
||||||
let d2 = ((typeof performance !== 'undefined') && performance.now && (performance.now()*1000)) || 0;//Time in microseconds since page-load or 0 if unsupported
|
|
||||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
|
|
||||||
let r = Math.random() * 16;//random number between 0 and 16
|
|
||||||
if(d > 0){//Use timestamp until depleted
|
|
||||||
r = (d + r)%16 | 0;
|
|
||||||
d = Math.floor(d/16);
|
|
||||||
} else {//Use microseconds since page-load if supported
|
|
||||||
r = (d2 + r)%16 | 0;
|
|
||||||
d2 = Math.floor(d2/16);
|
|
||||||
}
|
|
||||||
return (c === 'x' ? r : (r & 0x3 | 0x8)).toString(16);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public GetEditorComponent() {
|
public GetEditorComponent() {
|
||||||
return this.$component[0].querySelector('.Editor');
|
return this.$component[0].querySelector('.Editor');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue