Last active
November 15, 2015 02:04
-
-
Save pfgithub/99e79bbbd2b3fd88bad4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wm = require('./api/windowman.js'); | |
console.log(wm); | |
var window = new wm.Window("My window"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $ = require('jquery'); | |
function panel(x,y,w,h){ | |
return $('<li>').attr("style","top:"+x+"px;left:"+y+"px;width:"+w+"px;height:"+h+"px;").addClass('contained'); | |
} | |
var Window = function(title, w, h, x, y){ | |
this.title=title; | |
this.w=w; | |
this.h=h; | |
this.x=x; | |
this.y=y; | |
if(!this.title){this.title = "Untitled Window";} | |
if(!this.w){this.w = 100;} | |
if(!this.h){this.h = 100;} | |
if(!this.x){this.x = 50;} | |
if(!this.y){this.y = 50;} | |
this.panel = panel(x,y,w,h); | |
$('#container').append( | |
this.panel | |
); | |
this.panel.append($("<h1>").text("hi")); | |
} | |
module.exports = { | |
Window: Window, | |
astring: "astring" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment