kaleidoscopejs
Version:
360º video/image viewer
17 lines (14 loc) • 397 B
JavaScript
import ThreeSixtyViewer from './three-sixty-viewer';
export default class Image extends ThreeSixtyViewer {
constructor(options) {
super(options);
}
getElement() {
if (this.source && this.source.tagName)
return this.source;
let image = document.createElement('img');
image.setAttribute('crossorigin', 'anonymous');
image.src = this.source;
return image;
}
}