tmap-faerun-js
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "tmap-faerun-js", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A JavaScript API to load and display TMAPs in the browser.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,3 +27,7 @@ let Lore = require('lore-engine') | ||
this.canvasId = canvasId; | ||
this.canvas = document.getElementById(this.canvasId) | ||
if (Faerun.isElement(this.canvasId)) { | ||
this.canvas = this.canvasId; | ||
} else { | ||
this.canvas = document.getElementById(this.canvasId); | ||
} | ||
this.body = document.getElementsByTagName('body')[0]; | ||
@@ -866,2 +870,6 @@ this.selectedItems = []; | ||
static isElement(obj) { | ||
return obj instanceof Element | ||
} | ||
static createElement(tag, values = {}, children = []) { | ||
@@ -868,0 +876,0 @@ let element = document.createElement(tag); |
Sorry, the diff of this file is too big to display
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
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
665009
13044