Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Jul 20, 2011
1 parent 33504d7 commit 5018d01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "stylus-sprite",
"description": "Generate sprite images with Stylus",
"version": "0.1.5",
"version": "0.1.6",
"author" : "Andris Reinman",
"maintainers":[
{
Expand Down
12 changes: 7 additions & 5 deletions stylus-sprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ Sprite.prototype.makeMap = function(css, callback){
spriteImage = this.createImage(this.canvasWidth, this.canvasHeight, this.output_format),

posX, posY,
curX=0, curY=0,
startX=0, startY=0, lineHeight = 0,
curX = 0, curY = 0,
startX = 0, startY = 0, lineHeight = 0,
remainder;

for(var i=0, len = this.processedImages.length; i<len; i++){
Expand Down Expand Up @@ -395,6 +395,8 @@ Sprite.prototype.makeMap = function(css, callback){
curX = this.canvasWidth - currentImageData.width;
break;
case "left":
curX = 0;
break;
default:
curX = 0;
}
Expand Down Expand Up @@ -440,13 +442,13 @@ Sprite.prototype.makeMap = function(css, callback){

switch(currentImageData.align){
case "right":
startX = "100%";
cssPlacementX = "100%";
break;
case "center":
startX = "center";
cssPlacementX = "center";
break;
}

css = css.replace(re, cssPlacementX+" "+cssPlacementY);
}

Expand Down

0 comments on commit 5018d01

Please sign in to comment.