Skip to content

Commit

Permalink
v2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaspare Sganga committed Mar 16, 2018
1 parent cdebed0 commit 4660a66
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 11 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## v2.0.1 - 2018-03-16
### Fixed
- Changed value for overlay `justify-content` CSS property from `space-evenly` to `space-around`: Edge didn't like the former
- Set explicit `width` and `height` for SVG, addressing bug in Chrome



## v2.0.0 - 2018-03-16
### Added
- SVG images support
Expand Down
13 changes: 10 additions & 3 deletions dist/loadingoverlay.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/***************************************************************************************************
LoadingOverlay - A flexible loading overlay jQuery plugin
Author : Gaspare Sganga
Version : 2.0.0
Version : 2.0.1
License : MIT
Documentation : https://gasparesganga.com/labs/jquery-loading-overlay/
***************************************************************************************************/
Expand Down Expand Up @@ -83,7 +83,7 @@ LoadingOverlay - A flexible loading overlay jQuery plugin
"display" : "flex",
"flex-wrap" : "nowrap",
"align-items" : "center",
"justify-content" : "space-evenly"
"justify-content" : "space-around"
},
element : {
"box-sizing" : "border-box",
Expand All @@ -93,6 +93,10 @@ LoadingOverlay - A flexible loading overlay jQuery plugin
"justify-content" : "center",
"align-items" : "center"
},
element_svg : {
"width" : "100%",
"height" : "100%"
},
progress_wrapper: {
"position" : "absolute",
"top" : "0",
Expand Down Expand Up @@ -222,10 +226,13 @@ LoadingOverlay - A flexible loading overlay jQuery plugin
if (settings.image.slice(0, 4).toLowerCase() === "<svg" && settings.image.slice(-6).toLowerCase() === "</svg>") {
// Inline SVG
element.append(settings.image);
element.children().css(_css.element_svg);
if (!settings.imageClass && settings.imageColor) element.css("fill", settings.imageColor);
} else if (settings.image.slice(-4).toLowerCase() === ".svg" || settings.image.slice(0, 14).toLowerCase() === "data:image/svg") {
// SVG file or base64-encoded SVG
element.load(settings.image);
element.load(settings.image, function(){
element.children().css(_css.element_svg);
});
if (!settings.imageClass && settings.imageColor) element.css("fill", settings.imageColor);
} else {
// Raster
Expand Down
4 changes: 2 additions & 2 deletions dist/loadingoverlay.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/loadingoverlay.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gasparesganga-jquery-loading-overlay",
"version": "2.0.0",
"version": "2.0.1",
"description": "A flexible loading overlay jQuery plugin",
"homepage": "https://gasparesganga.com/labs/jquery-loading-overlay/",
"author": "Gaspare Sganga <[email protected]> (https://gasparesganga.com)",
Expand Down
13 changes: 10 additions & 3 deletions src/loadingoverlay.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/***************************************************************************************************
LoadingOverlay - A flexible loading overlay jQuery plugin
Author : Gaspare Sganga
Version : 2.0.0
Version : 2.0.1
License : MIT
Documentation : https://gasparesganga.com/labs/jquery-loading-overlay/
***************************************************************************************************/
Expand Down Expand Up @@ -83,7 +83,7 @@ LoadingOverlay - A flexible loading overlay jQuery plugin
"display" : "flex",
"flex-wrap" : "nowrap",
"align-items" : "center",
"justify-content" : "space-evenly"
"justify-content" : "space-around"
},
element : {
"box-sizing" : "border-box",
Expand All @@ -93,6 +93,10 @@ LoadingOverlay - A flexible loading overlay jQuery plugin
"justify-content" : "center",
"align-items" : "center"
},
element_svg : {
"width" : "100%",
"height" : "100%"
},
progress_wrapper: {
"position" : "absolute",
"top" : "0",
Expand Down Expand Up @@ -222,10 +226,13 @@ LoadingOverlay - A flexible loading overlay jQuery plugin
if (settings.image.slice(0, 4).toLowerCase() === "<svg" && settings.image.slice(-6).toLowerCase() === "</svg>") {
// Inline SVG
element.append(settings.image);
element.children().css(_css.element_svg);
if (!settings.imageClass && settings.imageColor) element.css("fill", settings.imageColor);
} else if (settings.image.slice(-4).toLowerCase() === ".svg" || settings.image.slice(0, 14).toLowerCase() === "data:image/svg") {
// SVG file or base64-encoded SVG
element.load(settings.image);
element.load(settings.image, function(){
element.children().css(_css.element_svg);
});
if (!settings.imageClass && settings.imageColor) element.css("fill", settings.imageColor);
} else {
// Raster
Expand Down

0 comments on commit 4660a66

Please sign in to comment.