Skip to content

Commit

Permalink
fixed bg color is now black in creation template, fixed no more margi…
Browse files Browse the repository at this point in the history
…n around main container, fixed resize website body bug when playing with stage size
  • Loading branch information
lexoyo committed Sep 29, 2015
1 parent ea0d5e1 commit 3806c15
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/client/creation-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script type="text/javascript" class="silex-script"></script>
<style class="silex-inline-styles" type="text/css">
.body-initial {
background-color: rgb(0, 0, 0);
background-color: #262626;
}
.background-initial {
background-color: rgb(255, 255, 255);
Expand Down
8 changes: 4 additions & 4 deletions src/js/model/property.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,10 @@ silex.model.Property.prototype.getBoundingBox = function(elements) {
var elementRight = (elementLeft || 0) + elementWidth;
var elementBottom = (elementTop || 0) + elementHeight;
// take the smallest top and left and the bigger bottom and rigth
top = isNaN(top) ? elementTop : Math.min(top, elementTop);
left = isNaN(left) ? elementLeft : Math.min(left, elementLeft);
bottom = isNaN(bottom) ? elementBottom : Math.max(bottom, elementBottom);
right = isNaN(right) ? elementRight : Math.max(right, elementRight);
top = isNaN(top) ? elementTop : Math.min(top, isNaN(elementTop) ? top : elementTop);
left = isNaN(left) ? elementLeft : Math.min(left, isNaN(elementLeft) ? left : elementLeft);
bottom = isNaN(bottom) ? elementBottom : Math.max(bottom, isNaN(elementBottom) ? bottom : elementBottom);
right = isNaN(right) ? elementRight : Math.max(right, isNaN(elementRight) ? right : elementRight);
}, this);
// no value for NaN results
var res = {};
Expand Down
4 changes: 2 additions & 2 deletions src/js/view/stage.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ silex.view.Stage.prototype.bodyElementSizeToContent = function(event) {
let desiredBodyWidth = bb.width + 100;
if (desiredBodyWidth < viewportSize.width) {
// let the css handle a body of the size of the stage
goog.style.setStyle(this.bodyElement, 'minWidth');
goog.style.setStyle(this.bodyElement, 'minWidth', '');
}
else {
// we want the body to be this size
Expand All @@ -247,7 +247,7 @@ silex.view.Stage.prototype.bodyElementSizeToContent = function(event) {
let desiredBodyHeight = bb.height + 100;
if (desiredBodyHeight < viewportSize.height) {
// let the css handle a body of the size of the stage
goog.style.setStyle(this.bodyElement, 'minHeight');
goog.style.setStyle(this.bodyElement, 'minHeight', '');
}
else {
// we want the body to be this size
Expand Down

0 comments on commit 3806c15

Please sign in to comment.