Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/LightFace.IFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license:
- MIT-style license

requires:
core/1.2.1: "*"
- LightFace

provides:
- LightFace.IFrame
Expand Down
18 changes: 9 additions & 9 deletions Source/LightFace.Image.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ authors:
- David Walsh (http://davidwalsh.name)

license:
- MIT-style license
- MIT-style license

requires:
core/1.2.1: "*"
- LightFace

provides:
- LightFace.Image
Expand All @@ -30,10 +30,10 @@ LightFace.Image = new Class({
_resize: function() {
//get the largest possible height
var maxHeight = window.getSize().y - this.options.pad;

//get the image size
var imageDimensions = document.id(this.image).retrieve("dimensions");

//if image is taller than window...
if(imageDimensions.y > maxHeight) {
this.image.height = maxHeight;
Expand All @@ -43,10 +43,10 @@ LightFace.Image = new Class({
width: (imageDimensions.x * (maxHeight / imageDimensions.y)).toInt()
});
}

//get rid of styles
this.messageBox.setStyles({ height: "", width: "" });

//position the box
this._position();
},
Expand All @@ -65,8 +65,8 @@ LightFace.Image = new Class({
events: {
load: function() {
(function() {
var setSize = function() {
this.image.inject(this.messageBox).store("dimensions", this.image.getSize());
var setSize = function() {
this.image.inject(this.messageBox).store("dimensions", this.image.getSize());
}.bind(this);
setSize();
this._resize();
Expand All @@ -91,7 +91,7 @@ LightFace.Image = new Class({
}
});
this.image.src = url || this.options.url;
if(title && this.title) this.title.set("html", title);
if(title && this.title) this.title.set("html", title);
return this;
}
});
6 changes: 3 additions & 3 deletions Source/LightFace.Request.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license:
- MIT-style license

requires:
core/1.2.1: "*"
- LightFace

provides:
- LightFace.Request
Expand Down Expand Up @@ -49,10 +49,10 @@ LightFace.Request = new Class({
this.fireEvent("complete");
}.bind(this)
},this.options.request);

if(title && this.title) this.title.set("html", title);
if(!props.url) props.url = url || this.options.url;

new Request(props).send();
return this;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/LightFace.Static.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license:
- MIT-style license

requires:
core/1.2.1: '*'
- LightFace

provides:
- LightFace.Static
Expand Down
8 changes: 7 additions & 1 deletion package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@ current: 0.97
category: Interface
tags: [lightbox,facebook,overlay,modal]
docs: http://davidwalsh.name/js/lightface
demo: http://davidwalsh.name/dw-content/lightface.php
demo: http://davidwalsh.name/dw-content/lightface.php
sources:
- "Source/LightFace.js"
- "Source/LightFace.Image.js"
- "Source/LightFace.IFrame.js"
- "Source/LightFace.Static.js"
- "Source/LightFace.Request.js"