Skip to content

Commit

Permalink
Use singular names for properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Moore committed Feb 4, 2013
1 parent fbd08fc commit 5ebaaec
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Send me your language configuration files. See /i18n/jquery.colorbox-de.js as a

### Version 1.3.33 - 2013/2/4

* Added retina display properties: retinaImages, retinaUrls, retinaSuffix
* Added retina display properties: retinaImage, retinaUrl, retinaSuffix
* Fixed iframe scrolling on iOS devices.

### Version 1.3.32 - 2013/1/31
Expand Down
2 changes: 1 addition & 1 deletion example1/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
});

$('.non-retina').colorbox({rel:'group5', transition:'none'})
$('.retina').colorbox({rel:'group5', transition:'none', retinaImages:true, retinaUrls:true});
$('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});

//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
Expand Down
2 changes: 1 addition & 1 deletion example2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
});

$('.non-retina').colorbox({rel:'group5', transition:'none'})
$('.retina').colorbox({rel:'group5', transition:'none', retinaImages:true, retinaUrls:true});
$('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});

//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
Expand Down
2 changes: 1 addition & 1 deletion example3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
});

$('.non-retina').colorbox({rel:'group5', transition:'none'})
$('.retina').colorbox({rel:'group5', transition:'none', retinaImages:true, retinaUrls:true});
$('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});

//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
Expand Down
2 changes: 1 addition & 1 deletion example4/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
});

$('.non-retina').colorbox({rel:'group5', transition:'none'})
$('.retina').colorbox({rel:'group5', transition:'none', retinaImages:true, retinaUrls:true});
$('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});

//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
Expand Down
2 changes: 1 addition & 1 deletion example5/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
});

$('.non-retina').colorbox({rel:'group5', transition:'none'})
$('.retina').colorbox({rel:'group5', transition:'none', retinaImages:true, retinaUrls:true});
$('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});

//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
Expand Down
2 changes: 1 addition & 1 deletion jquery.colorbox-min.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions jquery.colorbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
className: false,

// alternate image paths for high-res displays
retinaImages: false,
retinaUrls: false,
retinaImage: false,
retinaUrl: false,
retinaSuffix: '@2x.$1',

// internationalization
Expand Down Expand Up @@ -170,8 +170,8 @@
return settings.photo || settings.photoRegex.test(url);
}

function retinaUrls(url) {
return settings.retinaUrls && window.devicePixelRatio > 1 ? url.replace(settings.photoRegex, settings.retinaSuffix) : url;
function retinaUrl(url) {
return settings.retinaUrl && window.devicePixelRatio > 1 ? url.replace(settings.photoRegex, settings.retinaSuffix) : url;
}

// Assigns function results to their respective properties
Expand Down Expand Up @@ -864,7 +864,7 @@
prep(settings.html);
} else if (isImage(href)) {

href = retinaUrls(href);
href = retinaUrl(href);

$(photo = new Image())
.addClass(prefix + 'Photo')
Expand All @@ -875,7 +875,7 @@
.one('load', function () {
var percent;

if (settings.retinaImages && window.devicePixelRatio > 1) {
if (settings.retinaImage && window.devicePixelRatio > 1) {
photo.height = photo.height / window.devicePixelRatio;
photo.width = photo.width / window.devicePixelRatio;
}
Expand Down

0 comments on commit 5ebaaec

Please sign in to comment.