Skip to content

Commit

Permalink
4.1.3 build
Browse files Browse the repository at this point in the history
  • Loading branch information
dimsemenov committed Jan 8, 2019
1 parent 246e035 commit 80607e1
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2016 Dmitry Semenov, http://dimsemenov.com
Copyright (c) 2014-2019 Dmitry Semenov, http://dimsemenov.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "photoswipe",
"homepage": "http://photoswipe.com",
"homepage": "https://photoswipe.com",
"authors": [
"Dmitry Semenov <diiiimaaaa@gmail.com> (http://dimsemenov.com)"
],
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"repository": "dimsemenov/PhotoSwipe",
"description": "JavaScript gallery",
"main": "dist/photoswipe.js",
"version": "4.1.2",
"version": "4.1.3",
"keywords": [
"gallery",
"lightbox",
Expand Down
4 changes: 2 additions & 2 deletions dist/photoswipe-ui-default.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! PhotoSwipe Default UI - 4.1.2 - 2017-04-05
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2017 Dmitry Semenov; */
* Copyright (c) 2019 Dmitry Semenov; */
/**
*
* UI on top of main sliding area (caption, arrows, close button, etc.).
Expand Down
4 changes: 2 additions & 2 deletions dist/photoswipe-ui-default.min.js

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

18 changes: 9 additions & 9 deletions dist/photoswipe.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! PhotoSwipe - v4.1.2 - 2017-04-05
/*! PhotoSwipe - v4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2017 Dmitry Semenov; */
* Copyright (c) 2019 Dmitry Semenov; */
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
Expand Down Expand Up @@ -157,7 +157,7 @@ var framework = {
features.caf = window.cancelAnimationFrame;
}

features.pointerEvent = navigator.pointerEnabled || navigator.msPointerEnabled;
features.pointerEvent = !!(window.PointerEvent) || navigator.msPointerEnabled;

// fix false-positive detection of old Android in new IE
// (IE11 ua string contains "Android 4.0")
Expand Down Expand Up @@ -1987,9 +1987,7 @@ var _gestureStartTime,
if(pointerIndex > -1) {
releasePoint = _currPointers.splice(pointerIndex, 1)[0];

if(navigator.pointerEnabled) {
releasePoint.type = e.pointerType || 'mouse';
} else {
if(navigator.msPointerEnabled) {

This comment has been minimized.

Copy link
@KingSora

KingSora Apr 28, 2019

I don't want to open a PR for this, because you'll likely not merge it, but with this change IE11 wont execute swipe, zoom or other touch like gestures. You can test it, open your Demo page with IE11 and see for yourself.
Thats because IE11 also has the property navigator.msPointerEnabled like IE10, but IE11 events are different from IE10 events, but with this if statement youre basically applying IE10 events to IE11. The correct if statement should be something like this:

if(!navigator.pointerEnabled && navigator.msPointerEnabled) {
//...
}

because IE10 doesn't have the property navigator.pointerEnabled, but IE11 has it.

var MSPOINTER_TYPES = {
4: 'mouse', // event.MSPOINTER_TYPE_MOUSE
2: 'touch', // event.MSPOINTER_TYPE_TOUCH
Expand All @@ -2000,6 +1998,8 @@ var _gestureStartTime,
if(!releasePoint.type) {
releasePoint.type = e.pointerType || 'mouse';
}
} else {
releasePoint.type = e.pointerType || 'mouse';
}

}
Expand Down Expand Up @@ -2452,11 +2452,11 @@ _registerModule('Gestures', {
}

if(_pointerEventEnabled) {
if(navigator.pointerEnabled) {
addEventNames('pointer', 'down', 'move', 'up', 'cancel');
} else {
if(navigator.msPointerEnabled) {

This comment has been minimized.

Copy link
@KingSora

KingSora Apr 28, 2019

The same issue here, the correct if would be:

if(!navigator.pointerEnabled && navigator.msPointerEnabled) {
//...
}

with the same reasons as mentioned above.

// IE10 pointer events are case-sensitive
addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');
} else {
addEventNames('pointer', 'down', 'move', 'up', 'cancel');
}
} else if(_features.touch) {
addEventNames('touch', 'start', 'move', 'end', 'cancel');
Expand Down
6 changes: 3 additions & 3 deletions dist/photoswipe.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion photoswipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "PhotoSwipe",
"title": "Photoswipe",
"description": "",
"version": "4.1.2",
"version": "4.1.3",
"homepage": "http://photoswipe.com",
"demo": "http://photoswipe.com",
"docs": "http://photoswipe.com",
Expand Down

1 comment on commit 80607e1

@Jogai
Copy link

@Jogai Jogai commented on 80607e1 Jan 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome to see some dev activity again!

Please sign in to comment.