-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathObjectStack.js
More file actions
32 lines (31 loc) · 1.03 KB
/
Copy pathObjectStack.js
File metadata and controls
32 lines (31 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function objectStack (Stage){
this.Stage = Stage;
this.addActiveObjectsToStage = function (){
this.HeadLine();
}
this.HeadLine = function (){
headLine = new activeObjectRect(this.Stage,'Headline');
headLine.setFillColor(this.Stage.ButtonColor);
if (this.Stage.IsATouchDevice()){
ElementHeight = this.Stage.canvas.height*0.1;
headLine.setTopLeft(0,this.Stage.canvas.height-ElementHeight);
headLine.setHeightAndWidth(ElementHeight,this.Stage.canvas.width);
}else{
ElementHeight = 30;
headLine.setTopLeft(0,0);
headLine.setHeightAndWidth(ElementHeight,this.Stage.canvas.width);
}
headLine.action = this.AlertObject;
headLine.addToStage();
}
this.AlertObject = function (){
innerObject = new activeObjectRect(this.Stage,'innerObject');
innerObject.setFillColor('#ff00ff');
innerObject.setTopLeft(100 ,100);
innerObject.action = function (){
this.removeFromStage();
};
innerObject.addToStage();
Stage.rewriteCanvas();
}
}