diff --git a/gulpfile.js b/gulpfile.js index b824cfc..5f5fd56 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,7 +4,7 @@ const fs = require("fs"); const path = require("path"); exports.default = () => { - return src("views/**/*.js") + return src("views/**/*.html") .pipe( through2.obj(function (file, _, cb) { if (file.isBuffer()) { diff --git a/views/scripts/windows.js b/views/scripts/windows.js index 60526da..6cff6b7 100755 --- a/views/scripts/windows.js +++ b/views/scripts/windows.js @@ -11,9 +11,9 @@ class WindowObject { #orig_selfPosY; #isDragging; - constructor(parent, content, srcdoc) { + constructor(parent, content, srcdoc, w, h) { this.parentElement = parent; - this.windowObject = WindowObject.createWindow(this, content, srcdoc); + this.windowObject = WindowObject.createWindow(this, content, srcdoc, w, h); this.parentElement.appendChild(this.windowObject); WindowObject.raiseWindow(this.windowObject); @@ -154,9 +154,11 @@ class WindowObject { windowObj.focus(); } - static createWindow(windowRef, content, srcdoc) { + static createWindow(windowRef, content, srcdoc, w, h) { const windowObject = document.createElement("div"); windowObject.classList.add("window-object"); + windowObject.style.width = `calc(${w}px + 0.5em)`; + windowObject.style.height = `calc(${h}px + 1.5em)`; { const windowManager = document.createElement("div");