@breakside/jskit 2023.49.0 → 2023.53.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/JSRect.js +12 -0
- 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/JSRect.js +12 -0
- 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/UIButton.js +44 -1
- package/Root/Frameworks/UIKit/UICollectionView.js +12 -6
- package/Root/Frameworks/UIKit/UIHTMLTextRun.js +11 -0
- package/Root/Frameworks/UIKit/UIPopupWindow.js +10 -2
- package/Root/Frameworks/UIKit/UIScroller.js +24 -2
- package/Root/Frameworks/UIKit/UISegmentedControl.js +4 -0
- 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.53.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
|
|
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.53.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
|
|
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.53.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
|
|
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.53.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
|
|
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.53.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
|
|
13
13
|
}
|
|
@@ -65,6 +65,18 @@ JSRect.prototype = {
|
|
|
65
65
|
return xIntersects && yIntersects;
|
|
66
66
|
},
|
|
67
67
|
|
|
68
|
+
intersectingRect: function(other){
|
|
69
|
+
var origin = JSPoint(
|
|
70
|
+
Math.max(this.origin.x, other.origin.x),
|
|
71
|
+
Math.max(this.origin.y, other.origin.y)
|
|
72
|
+
);
|
|
73
|
+
var size = JSSize(
|
|
74
|
+
Math.max(0, Math.min(this.origin.x + this.size.width, other.origin.x + other.size.width) - origin.x),
|
|
75
|
+
Math.max(0, Math.min(this.origin.y + this.size.height, other.origin.y + other.size.height) - origin.y)
|
|
76
|
+
);
|
|
77
|
+
return JSRect(origin, size);
|
|
78
|
+
},
|
|
79
|
+
|
|
68
80
|
isEqual: function(other){
|
|
69
81
|
return this.origin.isEqual(other.origin) && this.size.isEqual(other.size);
|
|
70
82
|
},
|
|
@@ -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.53.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
|
|
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.53.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
|
|
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.53.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
|
|
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.53.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
|
|
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.53.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": "3d60b6912a95cf06a066a147c9bdf9b607dc2ef0"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -65,6 +65,18 @@ JSRect.prototype = {
|
|
|
65
65
|
return xIntersects && yIntersects;
|
|
66
66
|
},
|
|
67
67
|
|
|
68
|
+
intersectingRect: function(other){
|
|
69
|
+
var origin = JSPoint(
|
|
70
|
+
Math.max(this.origin.x, other.origin.x),
|
|
71
|
+
Math.max(this.origin.y, other.origin.y)
|
|
72
|
+
);
|
|
73
|
+
var size = JSSize(
|
|
74
|
+
Math.max(0, Math.min(this.origin.x + this.size.width, other.origin.x + other.size.width) - origin.x),
|
|
75
|
+
Math.max(0, Math.min(this.origin.y + this.size.height, other.origin.y + other.size.height) - origin.y)
|
|
76
|
+
);
|
|
77
|
+
return JSRect(origin, size);
|
|
78
|
+
},
|
|
79
|
+
|
|
68
80
|
isEqual: function(other){
|
|
69
81
|
return this.origin.isEqual(other.origin) && this.size.isEqual(other.size);
|
|
70
82
|
},
|
|
@@ -35,6 +35,10 @@ JSClass("UIButton", UIControl, {
|
|
|
35
35
|
|
|
36
36
|
initWithSpec: function(spec){
|
|
37
37
|
UIButton.$super.initWithSpec.call(this, spec);
|
|
38
|
+
// re-set borderWidth so it can override a styler's borderWidth
|
|
39
|
+
if (spec.containsKey('borderWidth')){
|
|
40
|
+
this.borderWidth = spec.valueForKey("borderWidth", Number);
|
|
41
|
+
}
|
|
38
42
|
if (spec.containsKey('font')){
|
|
39
43
|
this.titleLabel.font = spec.valueForKey("font", JSFont);
|
|
40
44
|
}
|
|
@@ -499,10 +503,15 @@ JSClass("UIButtonCustomStyler", UIButtonStyler, {
|
|
|
499
503
|
disabledBackgroundColor: null,
|
|
500
504
|
overBackgroundColor: null,
|
|
501
505
|
activeBackgroundColor: null,
|
|
506
|
+
normalBorderColor: null,
|
|
507
|
+
disabledBorderColor: null,
|
|
508
|
+
overBorderColor: null,
|
|
509
|
+
activeBorderColor: null,
|
|
502
510
|
normalTitleColor: null,
|
|
503
511
|
disabledTitleColor: null,
|
|
504
512
|
overTitleColor: null,
|
|
505
513
|
activeTitleColor: null,
|
|
514
|
+
borderWidth: 0,
|
|
506
515
|
cornerRadius: 0,
|
|
507
516
|
|
|
508
517
|
initWithBackgroundColor: function(normalBackgroundColor, normalTitleColor){
|
|
@@ -522,7 +531,7 @@ JSClass("UIButtonCustomStyler", UIButtonStyler, {
|
|
|
522
531
|
UIButtonCustomStyler.$super.init.call(this);
|
|
523
532
|
this.initWithColor(JSColor.text);
|
|
524
533
|
},
|
|
525
|
-
|
|
534
|
+
|
|
526
535
|
initWithSpec: function(spec){
|
|
527
536
|
UIButtonCustomStyler.$super.initWithSpec.call(this, spec);
|
|
528
537
|
if (spec.containsKey('normalBackgroundColor')){
|
|
@@ -537,6 +546,18 @@ JSClass("UIButtonCustomStyler", UIButtonStyler, {
|
|
|
537
546
|
if (spec.containsKey('overBackgroundColor')){
|
|
538
547
|
this.overBackgroundColor = spec.valueForKey("overBackgroundColor", JSColor);
|
|
539
548
|
}
|
|
549
|
+
if (spec.containsKey('normalBorderColor')){
|
|
550
|
+
this.normalBorderColor = spec.valueForKey("normalBorderColor", JSColor);
|
|
551
|
+
}
|
|
552
|
+
if (spec.containsKey('activeBorderColor')){
|
|
553
|
+
this.activeBorderColor = spec.valueForKey("activeBorderColor", JSColor);
|
|
554
|
+
}
|
|
555
|
+
if (spec.containsKey('disabledBorderColor')){
|
|
556
|
+
this.disabledBorderColor = spec.valueForKey("disabledBorderColor", JSColor);
|
|
557
|
+
}
|
|
558
|
+
if (spec.containsKey('overBorderColor')){
|
|
559
|
+
this.overBorderColor = spec.valueForKey("overBorderColor", JSColor);
|
|
560
|
+
}
|
|
540
561
|
if (spec.containsKey('normalTitleColor')){
|
|
541
562
|
this.normalTitleColor = spec.valueForKey("normalTitleColor", JSColor);
|
|
542
563
|
}
|
|
@@ -552,6 +573,9 @@ JSClass("UIButtonCustomStyler", UIButtonStyler, {
|
|
|
552
573
|
if (spec.containsKey('cornerRadius')){
|
|
553
574
|
this.cornerRadius = spec.valueForKey("cornerRadius", Number);
|
|
554
575
|
}
|
|
576
|
+
if (spec.containsKey('borderWidth')){
|
|
577
|
+
this.borderWidth = spec.valueForKey("borderWidth", Number);
|
|
578
|
+
}
|
|
555
579
|
this._commonInit();
|
|
556
580
|
},
|
|
557
581
|
|
|
@@ -572,12 +596,27 @@ JSClass("UIButtonCustomStyler", UIButtonStyler, {
|
|
|
572
596
|
if (this.disabledBackgroundColor === null){
|
|
573
597
|
this.disabledBackgroundColor = this.normalBackgroundColor.colorWithAlpha(0.5);
|
|
574
598
|
}
|
|
599
|
+
if (this.overBackgroundColor === null){
|
|
600
|
+
this.overBackgroundColor = this.normalBackgroundColor;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
if (this.normalBorderColor !== null){
|
|
604
|
+
if (this.activeBorderColor === null){
|
|
605
|
+
this.activeBorderColor = this.normalBorderColor;
|
|
606
|
+
}
|
|
607
|
+
if (this.disabledBorderColor === null){
|
|
608
|
+
this.disabledBorderColor = this.normalBorderColor.colorWithAlpha(0.5);
|
|
609
|
+
}
|
|
610
|
+
if (this.overBorderColor === null){
|
|
611
|
+
this.overBorderColor = this.normalBorderColor;
|
|
612
|
+
}
|
|
575
613
|
}
|
|
576
614
|
},
|
|
577
615
|
|
|
578
616
|
initializeControl: function(button){
|
|
579
617
|
UIButtonCustomStyler.$super.initializeControl.call(this, button);
|
|
580
618
|
button.cornerRadius = this.cornerRadius;
|
|
619
|
+
button.borderWidth = this.borderWidth;
|
|
581
620
|
this.updateControl(button);
|
|
582
621
|
},
|
|
583
622
|
|
|
@@ -585,6 +624,7 @@ JSClass("UIButtonCustomStyler", UIButtonStyler, {
|
|
|
585
624
|
UIButtonCustomStyler.$super.updateControl.call(this, button);
|
|
586
625
|
if (!button.enabled){
|
|
587
626
|
button.layer.backgroundColor = this.disabledBackgroundColor;
|
|
627
|
+
button.layer.borderColor = this.disabledBorderColor;
|
|
588
628
|
if (button._titleLabel !== null){
|
|
589
629
|
button._titleLabel.textColor = this.disabledTitleColor;
|
|
590
630
|
}
|
|
@@ -593,6 +633,7 @@ JSClass("UIButtonCustomStyler", UIButtonStyler, {
|
|
|
593
633
|
}
|
|
594
634
|
}else if (button.active){
|
|
595
635
|
button.layer.backgroundColor = this.activeBackgroundColor;
|
|
636
|
+
button.layer.borderColor = this.activeBorderColor;
|
|
596
637
|
if (button._titleLabel !== null){
|
|
597
638
|
button._titleLabel.textColor = this.activeTitleColor;
|
|
598
639
|
}
|
|
@@ -601,6 +642,7 @@ JSClass("UIButtonCustomStyler", UIButtonStyler, {
|
|
|
601
642
|
}
|
|
602
643
|
}else if (button.over){
|
|
603
644
|
button.layer.backgroundColor = this.overBackgroundColor;
|
|
645
|
+
button.layer.borderColor = this.overBorderColor;
|
|
604
646
|
if (button._titleLabel !== null){
|
|
605
647
|
button._titleLabel.textColor = this.overTitleColor;
|
|
606
648
|
}
|
|
@@ -609,6 +651,7 @@ JSClass("UIButtonCustomStyler", UIButtonStyler, {
|
|
|
609
651
|
}
|
|
610
652
|
}else{
|
|
611
653
|
button.layer.backgroundColor = this.normalBackgroundColor;
|
|
654
|
+
button.layer.borderColor = this.normalBorderColor;
|
|
612
655
|
if (button._titleLabel !== null){
|
|
613
656
|
button._titleLabel.textColor = this.normalTitleColor;
|
|
614
657
|
}
|
|
@@ -1124,10 +1124,10 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
1124
1124
|
if (hasSelection){
|
|
1125
1125
|
if (event.key == UIEvent.Key.up){
|
|
1126
1126
|
extend = (this.allowsMultipleSelection && this._selectionAnchorIndexPath && event.hasModifier(UIEvent.Modifier.shift));
|
|
1127
|
-
this._selectPreviousRow(extend, {notifyDelegate: true});
|
|
1127
|
+
// this._selectPreviousRow(extend, {notifyDelegate: true});
|
|
1128
1128
|
}else if (event.key == UIEvent.Key.down){
|
|
1129
1129
|
extend = (this.allowsMultipleSelection && this._selectionAnchorIndexPath && event.hasModifier(UIEvent.Modifier.shift));
|
|
1130
|
-
this._selectNextRow(extend, {notifyDelegate: true});
|
|
1130
|
+
// this._selectNextRow(extend, {notifyDelegate: true});
|
|
1131
1131
|
}else if (event.key == UIEvent.Key.enter){
|
|
1132
1132
|
if (this.delegate && this.delegate.collectionViewDidOpenCellAtIndexPath){
|
|
1133
1133
|
var indexPath = this.selectedIndexPath;
|
|
@@ -1309,14 +1309,17 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
1309
1309
|
for (var i = 0, l = this._visibleElements.length; i < l; ++i){
|
|
1310
1310
|
item = this._visibleElements[i];
|
|
1311
1311
|
if (item.attributes.elementCategory === UICollectionView.ElementCategory.cell){
|
|
1312
|
-
this._updateCellState(item.view);
|
|
1312
|
+
this._updateCellState(item.view, item.attributes.indexPath);
|
|
1313
1313
|
}
|
|
1314
1314
|
}
|
|
1315
1315
|
},
|
|
1316
1316
|
|
|
1317
|
-
_updateCellState: function(cell){
|
|
1318
|
-
|
|
1319
|
-
|
|
1317
|
+
_updateCellState: function(cell, indexPath){
|
|
1318
|
+
if (indexPath === undefined){
|
|
1319
|
+
indexPath = cell.indexPath;
|
|
1320
|
+
}
|
|
1321
|
+
cell.selected = this._selectionContainsIndexPath(indexPath);
|
|
1322
|
+
cell.contextSelected = this._contextSelectionContainsIndexPath(indexPath);
|
|
1320
1323
|
},
|
|
1321
1324
|
|
|
1322
1325
|
_selectionContainsIndexPath: function(indexPath){
|
|
@@ -1617,6 +1620,9 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
1617
1620
|
if (this._touch.cell){
|
|
1618
1621
|
this._touch.cell.active = false;
|
|
1619
1622
|
this._setSelectedIndexPaths([this._touch.cell.indexPath], {notifyDelegate: true});
|
|
1623
|
+
if (this.delegate && this.delegate.collectionViewDidFinishSelectingCellAtIndexPath){
|
|
1624
|
+
this.delegate.collectionViewDidFinishSelectingCellAtIndexPath(this, this._touch.cell.indexPath);
|
|
1625
|
+
}
|
|
1620
1626
|
}
|
|
1621
1627
|
this._touch = null;
|
|
1622
1628
|
},
|
|
@@ -145,6 +145,17 @@ JSClass("UIHTMLTextRun", JSTextRun, {
|
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
+
if (this.textNode !== null){
|
|
149
|
+
var localIndex = min - this.range.location;
|
|
150
|
+
localIndex *= this._maskFactor;
|
|
151
|
+
var iterator = this.textNode.nodeValue.userPerceivedCharacterIterator(localIndex);
|
|
152
|
+
localIndex = iterator.range.location;
|
|
153
|
+
localIndex /= this._maskFactor;
|
|
154
|
+
var correctedMin = this.range.location + localIndex;
|
|
155
|
+
if (correctedMin !== min){
|
|
156
|
+
min = correctedMin;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
148
159
|
return min;
|
|
149
160
|
},
|
|
150
161
|
|
|
@@ -100,8 +100,16 @@ JSClass("UIPopupWindow", UIWindow, {
|
|
|
100
100
|
(safeFrame.origin.x + safeFrame.size.width) - (sourceFrame.origin.x + sourceFrame.size.width)
|
|
101
101
|
);
|
|
102
102
|
if (placement == UIPopupWindow.Placement.below){
|
|
103
|
-
if (frame.size.height > available.bottom
|
|
104
|
-
|
|
103
|
+
if (frame.size.height > available.bottom){
|
|
104
|
+
if (available.top > available.bottom * 2){
|
|
105
|
+
placement = UIPopupWindow.Placement.above;
|
|
106
|
+
}else if (available.right > frame.size.width){
|
|
107
|
+
placement = UIPopupWindow.Placement.right;
|
|
108
|
+
}else if (available.left > frame.size.width){
|
|
109
|
+
placement = UIPopupWindow.Placement.left;
|
|
110
|
+
}else if (available.top > frame.size.width){
|
|
111
|
+
placement = UIPopupWindow.Placement.top;
|
|
112
|
+
}
|
|
105
113
|
}
|
|
106
114
|
}else if (placement == UIPopupWindow.Placement.above){
|
|
107
115
|
if (frame.size.height > available.top && available.bottom > available.top * 2){
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
// #import "JSColor+UIKit.js"
|
|
20
20
|
'use strict';
|
|
21
21
|
|
|
22
|
+
(function(){
|
|
23
|
+
|
|
24
|
+
var logger = JSLog("uikit", "scroller");
|
|
25
|
+
|
|
22
26
|
JSClass("UIScroller", UIControl, {
|
|
23
27
|
|
|
24
28
|
knob: JSReadOnlyProperty('_knob', null),
|
|
@@ -352,13 +356,29 @@ JSClass("UIScrollerDefaultStyler", UIScrollerStyler, {
|
|
|
352
356
|
|
|
353
357
|
_getVerticalKnobFrame: function(scroller){
|
|
354
358
|
var trackSize = this._getVerticalTrackSize(scroller);
|
|
355
|
-
var knobSize = JSSize(trackSize.width, trackSize.height * scroller._knobProportion);
|
|
359
|
+
var knobSize = JSSize(trackSize.width, Math.round(trackSize.height * scroller._knobProportion));
|
|
356
360
|
if (knobSize.height < this.minimumKnobLength){
|
|
357
361
|
knobSize.height = this.minimumKnobLength;
|
|
358
362
|
}
|
|
359
363
|
var minY = 0;
|
|
360
364
|
var maxY = minY + trackSize.height - knobSize.height;
|
|
361
365
|
var y = minY + (maxY - minY) * scroller._value;
|
|
366
|
+
if (isNaN(y)){
|
|
367
|
+
logger.warn(
|
|
368
|
+
"NaN y: y=%{public}, minY=%{public}, maxY=%{public}, value=%{public}, knobProportion=%{public}, trackSize=%{public}x%{public}, knobSize=%{public}x%{public}, minimumKnobLength=%{public}",
|
|
369
|
+
y,
|
|
370
|
+
minY,
|
|
371
|
+
maxY,
|
|
372
|
+
scroller._value,
|
|
373
|
+
scroller._knobProportion,
|
|
374
|
+
trackSize.width,
|
|
375
|
+
trackSize.height,
|
|
376
|
+
knobSize.width,
|
|
377
|
+
knobSize.height,
|
|
378
|
+
this.minimumKnobLength
|
|
379
|
+
);
|
|
380
|
+
y = 0;
|
|
381
|
+
}
|
|
362
382
|
return JSRect(
|
|
363
383
|
0,
|
|
364
384
|
y,
|
|
@@ -486,4 +506,6 @@ UIScroller.Styler = Object.defineProperties({}, {
|
|
|
486
506
|
Object.defineProperty(this, 'darkContent', {writable: true, value: styler});
|
|
487
507
|
}
|
|
488
508
|
}
|
|
489
|
-
});
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
})();
|
|
@@ -102,6 +102,10 @@ JSClass("UISegmentedControl", UIControl, {
|
|
|
102
102
|
this._insertItemAtIndex(item, index);
|
|
103
103
|
},
|
|
104
104
|
|
|
105
|
+
insertSegmentAtIndex: function(item, index){
|
|
106
|
+
this._insertItemAtIndex(item, index);
|
|
107
|
+
},
|
|
108
|
+
|
|
105
109
|
setSegmentTooltipAtIndex: function(tooltip, index){
|
|
106
110
|
this._items[index].tooltip = tooltip;
|
|
107
111
|
this._itemViews[index].update();
|