sprotty-vscode
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -22,2 +22,3 @@ /******************************************************************************** | ||
identifier: SprottyDiagramIdentifier; | ||
localResourceRoots: vscode.Uri[]; | ||
scriptPath: string; | ||
@@ -30,2 +31,3 @@ } | ||
readonly diagramIdentifier: SprottyDiagramIdentifier; | ||
readonly localResourceRoots: vscode.Uri[]; | ||
readonly scriptPath: string; | ||
@@ -39,3 +41,2 @@ readonly title: any; | ||
protected createWebviewPanel(): vscode.WebviewPanel; | ||
protected readonly localResourceRoots: vscode.Uri[]; | ||
protected getWebViewContent(): string; | ||
@@ -42,0 +43,0 @@ protected connect(): Promise<void>; |
@@ -83,2 +83,3 @@ "use strict"; | ||
this.diagramIdentifier = options.identifier; | ||
this.localResourceRoots = options.localResourceRoots; | ||
this.scriptPath = options.scriptPath; | ||
@@ -106,11 +107,2 @@ this.title = this.createTitle(); | ||
}; | ||
Object.defineProperty(SprottyWebview.prototype, "localResourceRoots", { | ||
get: function () { | ||
return [ | ||
vscode.Uri.file(path.join(this.extension.context.extensionPath, this.scriptPath.substring(0, this.scriptPath.lastIndexOf('/')))) | ||
]; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
SprottyWebview.prototype.getWebViewContent = function () { | ||
@@ -117,0 +109,0 @@ return "\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, height=device-height\">\n <title>" + this.title + "</title>\n <link\n rel=\"stylesheet\" href=\"https://use.fontawesome.com/releases/v5.6.3/css/all.css\"\n integrity=\"sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/\"\n crossorigin=\"anonymous\">\n </head>\n <body>\n <div id=\"" + this.diagramIdentifier.clientId + "\" style=\"height: 100%;\"></div>\n <script src=\"" + this.resourceUri(this.scriptPath) + "\"></script>\n </body>\n </html>"; |
@@ -10,3 +10,3 @@ { | ||
}, | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"engines": { | ||
@@ -13,0 +13,0 @@ "vscode": "^1.30.0" |
@@ -23,4 +23,5 @@ /******************************************************************************** | ||
export interface SprottyWebviewOptions { | ||
extension: SprottyVscodeExtension, | ||
identifier: SprottyDiagramIdentifier, | ||
extension: SprottyVscodeExtension | ||
identifier: SprottyDiagramIdentifier | ||
localResourceRoots: vscode.Uri[] | ||
scriptPath: string | ||
@@ -35,2 +36,3 @@ } | ||
readonly diagramIdentifier: SprottyDiagramIdentifier; | ||
readonly localResourceRoots: vscode.Uri[]; | ||
readonly scriptPath: string; | ||
@@ -46,2 +48,3 @@ readonly title: any; | ||
this.diagramIdentifier = options.identifier; | ||
this.localResourceRoots = options.localResourceRoots; | ||
this.scriptPath = options.scriptPath; | ||
@@ -76,10 +79,2 @@ this.title = this.createTitle(); | ||
protected get localResourceRoots(): vscode.Uri[] { | ||
return [ | ||
vscode.Uri.file(path.join( | ||
this.extension.context.extensionPath, | ||
this.scriptPath.substring(0, this.scriptPath.lastIndexOf('/')))) | ||
]; | ||
} | ||
protected getWebViewContent() { | ||
@@ -86,0 +81,0 @@ return ` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
67357
1132