Skip to content

Commit

Permalink
Updated component to version 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Semantic-Pusher-Robot committed Sep 17, 2018
1 parent 181662e commit 6783f5a
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 17 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"framework"
],
"license": "MIT",
"version": "2.3.3"
"version": "2.4.0"
}
21 changes: 15 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.3.3 - Popup
* # Semantic UI 2.4.0 - Popup
* https://github.com/semantic-org/semantic-ui/
*
*
Expand Down Expand Up @@ -1013,12 +1013,12 @@ module.exports = function(parameters) {
if(settings.hideOnScroll === true || (settings.hideOnScroll == 'auto' && settings.on != 'click')) {
module.bind.closeOnScroll();
}
if(settings.on == 'hover' && openedWithTouch) {
module.bind.touchClose();
}
if(settings.on == 'click' && settings.closable) {
if(module.is.closable()) {
module.bind.clickaway();
}
else if(settings.on == 'hover' && openedWithTouch) {
module.bind.touchClose();
}
},
closeOnScroll: function() {
module.verbose('Binding scroll close event to document');
Expand Down Expand Up @@ -1074,10 +1074,19 @@ module.exports = function(parameters) {
should: {
centerArrow: function(calculations) {
return !module.is.basic() && calculations.target.width <= (settings.arrowPixelsFromEdge * 2);
}
},
},

is: {
closable: function() {
if(settings.closable == 'auto') {
if(settings.on == 'hover') {
return false;
}
return true;
}
return settings.closable;
},
offstage: function(distanceFromBoundary, position) {
var
offstage = []
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "semantic-ui-popup",
"version": "2.3.3",
"version": "2.4.0",
"title": "Semantic UI - Popup",
"description": "Single component release of popup",
"homepage": "http://www.semantic-ui.com",
Expand Down
2 changes: 1 addition & 1 deletion popup.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.3.3 - Popup
* # Semantic UI 2.4.0 - Popup
* https://github.com/semantic-org/semantic-ui/
*
*
Expand Down
21 changes: 15 additions & 6 deletions popup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 2.3.3 - Popup
* # Semantic UI 2.4.0 - Popup
* https://github.com/semantic-org/semantic-ui/
*
*
Expand Down Expand Up @@ -1012,12 +1012,12 @@ $.fn.popup = function(parameters) {
if(settings.hideOnScroll === true || (settings.hideOnScroll == 'auto' && settings.on != 'click')) {
module.bind.closeOnScroll();
}
if(settings.on == 'hover' && openedWithTouch) {
module.bind.touchClose();
}
if(settings.on == 'click' && settings.closable) {
if(module.is.closable()) {
module.bind.clickaway();
}
else if(settings.on == 'hover' && openedWithTouch) {
module.bind.touchClose();
}
},
closeOnScroll: function() {
module.verbose('Binding scroll close event to document');
Expand Down Expand Up @@ -1073,10 +1073,19 @@ $.fn.popup = function(parameters) {
should: {
centerArrow: function(calculations) {
return !module.is.basic() && calculations.target.width <= (settings.arrowPixelsFromEdge * 2);
}
},
},

is: {
closable: function() {
if(settings.closable == 'auto') {
if(settings.on == 'hover') {
return false;
}
return true;
}
return settings.closable;
},
offstage: function(distanceFromBoundary, position) {
var
offstage = []
Expand Down
2 changes: 1 addition & 1 deletion popup.min.css

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

2 changes: 1 addition & 1 deletion popup.min.js

Large diffs are not rendered by default.

0 comments on commit 6783f5a

Please sign in to comment.