@breakside/jskit 2023.18.3 → 2023.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSLocale.js +14 -1
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Info.json +2 -2
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Root/Frameworks/APIKit/Info.yaml +1 -1
- package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/AuthKit/Info.yaml +1 -1
- package/Root/Frameworks/CSSOM/Info.yaml +1 -1
- package/Root/Frameworks/ChartKit/Info.yaml +1 -1
- package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
- package/Root/Frameworks/DBKit/Info.yaml +1 -1
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSLocale.js +14 -1
- package/Root/Frameworks/ImageKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
- package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
- package/Root/Frameworks/PDFKit/Info.yaml +1 -1
- package/Root/Frameworks/QRKit/Info.yaml +1 -1
- package/Root/Frameworks/SearchKit/Info.yaml +1 -1
- package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/UICollectionView.js +40 -20
- package/Root/Frameworks/UIKit/UIEvent.js +31 -0
- package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +11 -4
- package/Root/Frameworks/UIKit/UIListView.js +42 -22
- package/Root/Frameworks/UIKit/UIMenuView.js +32 -7
- package/Root/Frameworks/UIKit/UIPressGestureRecognizer.js +27 -34
- package/Root/Frameworks/UIKit/UIScrollGestureRecognizer.js +22 -5
- package/Root/Frameworks/UIKit/UIScrollView.js +22 -3
- package/Root/Frameworks/UIKit/UITapGestureRecognizer.js +23 -28
- package/Root/Frameworks/UIKit/UIWindow.js +47 -29
- package/Root/Frameworks/UIKit/UIWindowServer.js +10 -1
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
4
|
-
"JSBundleVersion": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.19.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "DOM+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "1dc0150a5a81da24491bad16f195a3683e48f654"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
6
|
-
"JSBundleVersion": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.19.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
11
11
|
"node": "DOM+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "1dc0150a5a81da24491bad16f195a3683e48f654"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
4
|
-
"JSBundleVersion": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.19.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
8
8
|
"html": "FontKit+HTML.js"
|
|
9
9
|
},
|
|
10
10
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "1dc0150a5a81da24491bad16f195a3683e48f654"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.JSKit.FontKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
6
|
-
"JSBundleVersion": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.19.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
10
10
|
"html": "FontKit+HTML.js"
|
|
11
11
|
},
|
|
12
12
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "1dc0150a5a81da24491bad16f195a3683e48f654"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [],
|
|
16
16
|
"ResourceLookup": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
4
|
-
"JSBundleVersion": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.19.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "Foundation+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "1dc0150a5a81da24491bad16f195a3683e48f654"
|
|
13
13
|
}
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
(function(){
|
|
22
22
|
|
|
23
|
+
var logger = JSLog("foundation", "locale");
|
|
24
|
+
|
|
23
25
|
JSClass("JSLocale", JSObject, {
|
|
24
26
|
|
|
25
27
|
identifier: JSReadOnlyProperty('_identifier', null),
|
|
@@ -626,6 +628,8 @@ JSLocale.preferredLanguagesVersion = 1;
|
|
|
626
628
|
|
|
627
629
|
JSLocale.data = {};
|
|
628
630
|
|
|
631
|
+
var warnedIdentifiers = {};
|
|
632
|
+
|
|
629
633
|
Object.defineProperties(JSLocale, {
|
|
630
634
|
|
|
631
635
|
preferredLanguages: {
|
|
@@ -641,7 +645,16 @@ Object.defineProperties(JSLocale, {
|
|
|
641
645
|
current: {
|
|
642
646
|
configurable: true,
|
|
643
647
|
get: function JSLocale_getCurrent(){
|
|
644
|
-
|
|
648
|
+
var preferredIdentifier = JSLocale._preferredLanguages[0];
|
|
649
|
+
var locale = JSLocale.initWithIdentifier(preferredIdentifier);
|
|
650
|
+
if (locale === null){
|
|
651
|
+
if (!(preferredIdentifier in warnedIdentifiers)){
|
|
652
|
+
warnedIdentifiers[preferredIdentifier] = true;
|
|
653
|
+
logger.warn("Unable to create locale from identifier '%{public}'", preferredIdentifier);
|
|
654
|
+
}
|
|
655
|
+
locale = JSLocale.initWithIdentifier(JSBundle.mainBundle.info.JSDevelopmentLanguage);
|
|
656
|
+
}
|
|
657
|
+
return locale;
|
|
645
658
|
}
|
|
646
659
|
}
|
|
647
660
|
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
6
|
-
"JSBundleVersion": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.19.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
11
11
|
"node": "Foundation+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "1dc0150a5a81da24491bad16f195a3683e48f654"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [
|
|
17
17
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
4
|
-
"JSBundleVersion": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.19.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "SecurityKit+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "1dc0150a5a81da24491bad16f195a3683e48f654"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
6
|
-
"JSBundleVersion": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.19.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
11
11
|
"node": "SecurityKit+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "1dc0150a5a81da24491bad16f195a3683e48f654"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
package/Info.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "node",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
4
|
-
"JSBundleVersion": "2023.
|
|
4
|
+
"JSBundleVersion": "2023.19.0",
|
|
5
5
|
"JSExecutableName": "jskit",
|
|
6
6
|
"NPMOrganization": "breakside",
|
|
7
7
|
"JSResources": [
|
|
8
8
|
"Tests/HTMLTestRunner.js",
|
|
9
9
|
"Tests/NodeTestRunner.js"
|
|
10
10
|
],
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "1dc0150a5a81da24491bad16f195a3683e48f654"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.jskit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "node",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
6
|
-
"JSBundleVersion": "2023.
|
|
6
|
+
"JSBundleVersion": "2023.19.0",
|
|
7
7
|
"JSExecutableName": "jskit",
|
|
8
8
|
"NPMOrganization": "breakside",
|
|
9
9
|
"JSResources": [
|
|
10
10
|
"Tests/HTMLTestRunner.js",
|
|
11
11
|
"Tests/NodeTestRunner.js"
|
|
12
12
|
],
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "1dc0150a5a81da24491bad16f195a3683e48f654"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -20,6 +20,8 @@
|
|
|
20
20
|
|
|
21
21
|
(function(){
|
|
22
22
|
|
|
23
|
+
var logger = JSLog("foundation", "locale");
|
|
24
|
+
|
|
23
25
|
JSClass("JSLocale", JSObject, {
|
|
24
26
|
|
|
25
27
|
identifier: JSReadOnlyProperty('_identifier', null),
|
|
@@ -626,6 +628,8 @@ JSLocale.preferredLanguagesVersion = 1;
|
|
|
626
628
|
|
|
627
629
|
JSLocale.data = {};
|
|
628
630
|
|
|
631
|
+
var warnedIdentifiers = {};
|
|
632
|
+
|
|
629
633
|
Object.defineProperties(JSLocale, {
|
|
630
634
|
|
|
631
635
|
preferredLanguages: {
|
|
@@ -641,7 +645,16 @@ Object.defineProperties(JSLocale, {
|
|
|
641
645
|
current: {
|
|
642
646
|
configurable: true,
|
|
643
647
|
get: function JSLocale_getCurrent(){
|
|
644
|
-
|
|
648
|
+
var preferredIdentifier = JSLocale._preferredLanguages[0];
|
|
649
|
+
var locale = JSLocale.initWithIdentifier(preferredIdentifier);
|
|
650
|
+
if (locale === null){
|
|
651
|
+
if (!(preferredIdentifier in warnedIdentifiers)){
|
|
652
|
+
warnedIdentifiers[preferredIdentifier] = true;
|
|
653
|
+
logger.warn("Unable to create locale from identifier '%{public}'", preferredIdentifier);
|
|
654
|
+
}
|
|
655
|
+
locale = JSLocale.initWithIdentifier(JSBundle.mainBundle.info.JSDevelopmentLanguage);
|
|
656
|
+
}
|
|
657
|
+
return locale;
|
|
645
658
|
}
|
|
646
659
|
}
|
|
647
660
|
|
|
@@ -1566,50 +1566,70 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
1566
1566
|
|
|
1567
1567
|
touchesBegan: function(touches, event){
|
|
1568
1568
|
UICollectionView.$super.touchesBegan.call(this, touches, event);
|
|
1569
|
-
if (
|
|
1570
|
-
|
|
1569
|
+
if (this._touch !== null){
|
|
1570
|
+
if (event.touchForIdentifier(this._touch.identifier) !== null){
|
|
1571
|
+
return;
|
|
1572
|
+
}
|
|
1571
1573
|
}
|
|
1574
|
+
var touch = touches[0];
|
|
1572
1575
|
this._touch = {
|
|
1573
|
-
|
|
1576
|
+
identifier: touch.identifier,
|
|
1577
|
+
location0: touch.locationInWindow,
|
|
1574
1578
|
cell: null,
|
|
1575
1579
|
timer: JSTimer.scheduledTimerWithInterval(0.05, function(){
|
|
1576
1580
|
this._touch.timer = null;
|
|
1577
|
-
this._makeTouchActiveCell(
|
|
1581
|
+
this._makeTouchActiveCell(touch, true);
|
|
1578
1582
|
}, this)
|
|
1579
1583
|
};
|
|
1580
1584
|
},
|
|
1581
1585
|
|
|
1582
1586
|
touchesMoved: function(touches, event){
|
|
1583
1587
|
UICollectionView.$super.touchesMoved.call(this, touches, event);
|
|
1584
|
-
if (this._touch
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1588
|
+
if (this._touch === null){
|
|
1589
|
+
return;
|
|
1590
|
+
}
|
|
1591
|
+
var touch = event.touchForIdentifier(this._touch.identifier);
|
|
1592
|
+
if (touches.indexOf(touch) < 0){
|
|
1593
|
+
return;
|
|
1594
|
+
}
|
|
1595
|
+
var location = touch.locationInWindow;
|
|
1596
|
+
var diff = location.subtracting(this._touch.location0);
|
|
1597
|
+
if ((diff.x * diff.x + diff.y * diff.y) > 2){
|
|
1598
|
+
this._cancelTouchSelection();
|
|
1590
1599
|
}
|
|
1591
1600
|
},
|
|
1592
1601
|
|
|
1593
1602
|
touchesEnded: function(touches, event){
|
|
1594
1603
|
UICollectionView.$super.touchesEnded.call(this, touches, event);
|
|
1595
|
-
if (
|
|
1604
|
+
if (this._touch === null){
|
|
1596
1605
|
return;
|
|
1597
1606
|
}
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
this.
|
|
1607
|
+
var touch = event.touchForIdentifier(this._touch.identifier);
|
|
1608
|
+
if (touches.indexOf(touch) < 0){
|
|
1609
|
+
return;
|
|
1610
|
+
}
|
|
1611
|
+
if (this._touch.timer !== null){
|
|
1612
|
+
this._touch.timer.invalidate();
|
|
1613
|
+
if (touch !== null){
|
|
1614
|
+
this._makeTouchActiveCell(touch);
|
|
1606
1615
|
}
|
|
1607
|
-
this._touch = null;
|
|
1608
1616
|
}
|
|
1617
|
+
if (this._touch.cell){
|
|
1618
|
+
this._touch.cell.active = false;
|
|
1619
|
+
this._setSelectedIndexPaths([this._touch.cell.indexPath], {notifyDelegate: true});
|
|
1620
|
+
}
|
|
1621
|
+
this._touch = null;
|
|
1609
1622
|
},
|
|
1610
1623
|
|
|
1611
1624
|
touchesCanceled: function(touches, event){
|
|
1612
1625
|
UICollectionView.$super.touchesCanceled.call(this, touches, event);
|
|
1626
|
+
if (this._touch === null){
|
|
1627
|
+
return;
|
|
1628
|
+
}
|
|
1629
|
+
var touch = event.touchForIdentifier(this._touch.identifier);
|
|
1630
|
+
if (touches.indexOf(touch) < 0){
|
|
1631
|
+
return;
|
|
1632
|
+
}
|
|
1613
1633
|
this._cancelTouchSelection();
|
|
1614
1634
|
},
|
|
1615
1635
|
|
|
@@ -115,6 +115,19 @@ JSClass('UIEvent', JSObject, {
|
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
|
|
118
|
+
removeUnreferencedTouches: function(touchIdentifiers){
|
|
119
|
+
var count = 0;
|
|
120
|
+
var touch;
|
|
121
|
+
for (var i = this._touches.length - 1; i >= 0; --i){
|
|
122
|
+
touch = this._touches[i];
|
|
123
|
+
if (!touchIdentifiers.has(touch.identifier)){
|
|
124
|
+
++count;
|
|
125
|
+
this._touches.splice(i, 1);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return count;
|
|
129
|
+
},
|
|
130
|
+
|
|
118
131
|
updateTouches: function(type, timestamp){
|
|
119
132
|
this._timestamp = timestamp;
|
|
120
133
|
this._type = type;
|
|
@@ -142,6 +155,24 @@ JSClass('UIEvent', JSObject, {
|
|
|
142
155
|
return touches;
|
|
143
156
|
},
|
|
144
157
|
|
|
158
|
+
hasPastTouches: function(){
|
|
159
|
+
for (var i = 0, l = this._touches.length; i < l; ++i){
|
|
160
|
+
if (this._touches[i].phase !== UITouch.Phase.began){
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return false;
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
hasFutureTouches: function(){
|
|
168
|
+
for (var i = 0, l = this._touches.length; i < l; ++i){
|
|
169
|
+
if (this._touches[i].phase !== UITouch.Phase.ended && this._touches[i].phase !== UITouch.Phase.canceled){
|
|
170
|
+
return true;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return false;
|
|
174
|
+
},
|
|
175
|
+
|
|
145
176
|
changedTouchesInWindow: function(window){
|
|
146
177
|
var touches = this.touchesInWindow(window);
|
|
147
178
|
for (var i = touches.length - 1; i >= 0; --i){
|
|
@@ -623,18 +623,25 @@ JSClass("UIHTMLWindowServer", UIWindowServer, {
|
|
|
623
623
|
|
|
624
624
|
_createTouchEventFromDOMEvent: function(e, type){
|
|
625
625
|
var timestamp = e.timeStamp / 1000.0;
|
|
626
|
-
var
|
|
626
|
+
var touchIdentifiers = new Set();
|
|
627
|
+
var changedTouchDescriptors = [];
|
|
627
628
|
var touchDescriptor = null;
|
|
628
629
|
var domTouch;
|
|
629
|
-
|
|
630
|
+
var i, l;
|
|
631
|
+
for (i = 0, l = e.touches.length; i < l; ++i){
|
|
632
|
+
domTouch = e.touches[i];
|
|
633
|
+
touchIdentifiers.add(domTouch.identifier);
|
|
634
|
+
}
|
|
635
|
+
for (i = 0, l = e.changedTouches.length; i < l; ++i){
|
|
630
636
|
domTouch = e.changedTouches[i];
|
|
631
637
|
touchDescriptor = {
|
|
632
638
|
identifier: domTouch.identifier,
|
|
633
639
|
location: this._locationOfDOMTouchInScreen(domTouch)
|
|
634
640
|
};
|
|
635
|
-
|
|
641
|
+
changedTouchDescriptors.push(touchDescriptor);
|
|
642
|
+
touchIdentifiers.add(domTouch.identifier);
|
|
636
643
|
}
|
|
637
|
-
this.createTouchEvent(type, timestamp,
|
|
644
|
+
this.createTouchEvent(type, timestamp, changedTouchDescriptors, touchIdentifiers);
|
|
638
645
|
},
|
|
639
646
|
|
|
640
647
|
// --------------------------------------------------------------------
|