@breakside/jskit 2023.14.0 → 2023.14.1
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/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/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 +1 -0
- package/Root/Frameworks/UIKit/UIHTMLTextField.js +2 -1
- package/Root/Frameworks/UIKit/UIListView.js +1 -0
- package/Root/Frameworks/UIKit/UITextEditor.js +31 -8
- package/Root/Frameworks/UIKit/UITextField.js +1 -0
- package/Root/Frameworks/UIKit/UITokenField.js +1 -1
- package/Root/Frameworks/UIKit/UIToolbar.js +17 -9
- package/Root/Frameworks/UIKit/UIWindow.js +12 -6
- 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.14.
|
|
4
|
+
"JSBundleVersion": "2023.14.1",
|
|
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": "530595d4ecd789a2237ec11990d0e612d0053151"
|
|
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.14.
|
|
6
|
+
"JSBundleVersion": "2023.14.1",
|
|
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": "530595d4ecd789a2237ec11990d0e612d0053151"
|
|
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.14.
|
|
4
|
+
"JSBundleVersion": "2023.14.1",
|
|
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": "530595d4ecd789a2237ec11990d0e612d0053151"
|
|
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.14.
|
|
6
|
+
"JSBundleVersion": "2023.14.1",
|
|
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": "530595d4ecd789a2237ec11990d0e612d0053151"
|
|
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.14.
|
|
4
|
+
"JSBundleVersion": "2023.14.1",
|
|
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": "530595d4ecd789a2237ec11990d0e612d0053151"
|
|
13
13
|
}
|
|
@@ -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.14.
|
|
6
|
+
"JSBundleVersion": "2023.14.1",
|
|
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": "530595d4ecd789a2237ec11990d0e612d0053151"
|
|
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.14.
|
|
4
|
+
"JSBundleVersion": "2023.14.1",
|
|
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": "530595d4ecd789a2237ec11990d0e612d0053151"
|
|
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.14.
|
|
6
|
+
"JSBundleVersion": "2023.14.1",
|
|
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": "530595d4ecd789a2237ec11990d0e612d0053151"
|
|
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.14.
|
|
4
|
+
"JSBundleVersion": "2023.14.1",
|
|
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": "530595d4ecd789a2237ec11990d0e612d0053151"
|
|
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.14.
|
|
6
|
+
"JSBundleVersion": "2023.14.1",
|
|
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": "530595d4ecd789a2237ec11990d0e612d0053151"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -105,7 +105,7 @@ JSClass("UIHTMLTextField", UIControl, {
|
|
|
105
105
|
this._clipView.userInteractionEnabled = false;
|
|
106
106
|
this._clipView.backgroundColor = null;
|
|
107
107
|
this._clipView.clipsToBounds = true;
|
|
108
|
-
this.cursor = UICursor.
|
|
108
|
+
this.cursor = UICursor.systemDefault;
|
|
109
109
|
if (this._styler === null){
|
|
110
110
|
this._styler = UITextField.Styler.default;
|
|
111
111
|
}
|
|
@@ -784,6 +784,7 @@ JSClass("UIHTMLTextField", UIControl, {
|
|
|
784
784
|
|
|
785
785
|
windowDidChangeKeyStatus: function(){
|
|
786
786
|
this.updateInputElementFocus();
|
|
787
|
+
UIHTMLTextField.$super.windowDidChangeKeyStatus.call(this);
|
|
787
788
|
},
|
|
788
789
|
|
|
789
790
|
_inputElementFocused: false,
|
|
@@ -436,6 +436,28 @@ JSClass("UITextEditor", JSObject, {
|
|
|
436
436
|
this._toggleBooleanAttribute("underline", "Underline");
|
|
437
437
|
},
|
|
438
438
|
|
|
439
|
+
strike: function(sender){
|
|
440
|
+
this._toggleBooleanAttribute("strike", "Strike");
|
|
441
|
+
},
|
|
442
|
+
|
|
443
|
+
setAttribute: function(name, value, undoName){
|
|
444
|
+
this.undoManager.beginUndoGrouping();
|
|
445
|
+
var i, l;
|
|
446
|
+
var selection;
|
|
447
|
+
var selections = this._selectionsCopy();
|
|
448
|
+
for (i = 0, l = selections.length; i < l; ++i){
|
|
449
|
+
selection = selections[i];
|
|
450
|
+
this._setAttributeValueForSelection(name, value, selection);
|
|
451
|
+
}
|
|
452
|
+
this._setSelectionsAllowingUndo(selections);
|
|
453
|
+
this.undoManager.endUndoGrouping();
|
|
454
|
+
this.undoManager.setActionName(undoName);
|
|
455
|
+
},
|
|
456
|
+
|
|
457
|
+
removeAttribute: function(name, undoName){
|
|
458
|
+
this.setAttribute(name, undefined, undoName);
|
|
459
|
+
},
|
|
460
|
+
|
|
439
461
|
removeParagraphAttribute: function(name, undoName){
|
|
440
462
|
this.setParagraphAttribute(name, undefined, undoName);
|
|
441
463
|
},
|
|
@@ -535,7 +557,7 @@ JSClass("UITextEditor", JSObject, {
|
|
|
535
557
|
var selections = this._selectionsCopy();
|
|
536
558
|
for (i = 0, l = selections.length; i < l; ++i){
|
|
537
559
|
selection = selections[i];
|
|
538
|
-
this.
|
|
560
|
+
this._setAttributeValueForSelection(name, !currentValue, selection);
|
|
539
561
|
}
|
|
540
562
|
this._setSelectionsAllowingUndo(selections);
|
|
541
563
|
this.undoManager.endUndoGrouping();
|
|
@@ -543,25 +565,26 @@ JSClass("UITextEditor", JSObject, {
|
|
|
543
565
|
this._resetSelectionAffinity();
|
|
544
566
|
},
|
|
545
567
|
|
|
546
|
-
|
|
568
|
+
_setAttributeValueForSelection: function(name, value, selection){
|
|
547
569
|
var textStorage = this.textLayoutManager.textStorage;
|
|
548
570
|
var replacementString;
|
|
549
571
|
if (selection.range.length > 0){
|
|
550
572
|
replacementString = textStorage.attributedSubstringInRange(selection.range);
|
|
551
|
-
if (value){
|
|
552
|
-
replacementString.addAttributeInRange(name,
|
|
573
|
+
if (value !== null && value !== undefined){
|
|
574
|
+
replacementString.addAttributeInRange(name, value, JSRange(0, replacementString.string.length));
|
|
553
575
|
}else{
|
|
554
576
|
replacementString.removeAttributeInRange(name, JSRange(0, replacementString.string.length));
|
|
555
577
|
}
|
|
556
578
|
this._replaceTextStorageRangeAllowingUndo(textStorage, selection.range, replacementString);
|
|
557
579
|
}else{
|
|
558
580
|
selection.attributes = this._insertAttributesForSelection(selection);
|
|
559
|
-
|
|
560
|
-
|
|
581
|
+
var currentValue = selection.attributes[name];
|
|
582
|
+
if (value !== null && value !== undefined){
|
|
583
|
+
selection.attributes[name] = value;
|
|
561
584
|
}else{
|
|
562
585
|
delete selection.attributes[name];
|
|
563
586
|
}
|
|
564
|
-
this.undoManager.registerUndo(this, this.
|
|
587
|
+
this.undoManager.registerUndo(this, this._setAttributeValueForSelection, name, currentValue, selection);
|
|
565
588
|
}
|
|
566
589
|
},
|
|
567
590
|
|
|
@@ -723,7 +746,7 @@ JSClass("UITextEditor", JSObject, {
|
|
|
723
746
|
}
|
|
724
747
|
var index = selection.range.location;
|
|
725
748
|
var iterator;
|
|
726
|
-
if (index > 0){
|
|
749
|
+
if (selection.range.length === 0 && index > 0){
|
|
727
750
|
iterator = this.textLayoutManager.textStorage.string.userPerceivedCharacterIterator(index);
|
|
728
751
|
iterator.decrement();
|
|
729
752
|
if (!iterator.isParagraphBreak){
|
|
@@ -201,7 +201,7 @@ JSClass("UITokenFieldTokenView", UIView, {
|
|
|
201
201
|
this.tokenLabel.cornerRadius = 3.0;
|
|
202
202
|
this.addSubview(this.tokenLabel);
|
|
203
203
|
this._tokenInsets = JSInsets(0, 1.5);
|
|
204
|
-
this.tokenLabel.cursor = UICursor.
|
|
204
|
+
this.tokenLabel.cursor = UICursor.systemDefault;
|
|
205
205
|
this.setNeedsLayout();
|
|
206
206
|
},
|
|
207
207
|
|
|
@@ -78,7 +78,7 @@ JSClass("UIToolbar", UIView, {
|
|
|
78
78
|
|
|
79
79
|
setItems: function(items){
|
|
80
80
|
var i, l;
|
|
81
|
-
for (i = this._items.length; i >= 0; --i){
|
|
81
|
+
for (i = this._items.length - 1; i >= 0; --i){
|
|
82
82
|
this.removeItemAtIndex(i);
|
|
83
83
|
}
|
|
84
84
|
for (i = 0, l = items.length; i < l; ++i){
|
|
@@ -218,7 +218,7 @@ JSClass("UIToolbarItemView", UIView, {
|
|
|
218
218
|
}else{
|
|
219
219
|
switch (item.identifier){
|
|
220
220
|
case UIToolbarItem.Identifier.space:
|
|
221
|
-
this.contentView = UIToolbarItemSpaceView.initWithWidth(item.
|
|
221
|
+
this.contentView = UIToolbarItemSpaceView.initWithWidth(item.minimumSize !== null ? item.minimumSize.width : item.toolbar.imageSize);
|
|
222
222
|
this._handlesEvents = false;
|
|
223
223
|
break;
|
|
224
224
|
case UIToolbarItem.Identifier.flexibleSpace:
|
|
@@ -267,10 +267,11 @@ JSClass("UIToolbarItemView", UIView, {
|
|
|
267
267
|
}
|
|
268
268
|
var width;
|
|
269
269
|
var height;
|
|
270
|
-
if (
|
|
271
|
-
width = this._item.minimumWidth;
|
|
272
|
-
}else if (this._item.view !== null){
|
|
270
|
+
if (this._item.view !== null){
|
|
273
271
|
width = this._item.view.intrinsicSize.width;
|
|
272
|
+
if (width === UIView.noIntrinsicSize){
|
|
273
|
+
width = bounds.size.width;
|
|
274
|
+
}
|
|
274
275
|
}else{
|
|
275
276
|
width = this._item.image.size.width * toolbar._imageSize / this._item.image.size.height;
|
|
276
277
|
}
|
|
@@ -292,10 +293,15 @@ JSClass("UIToolbarItemView", UIView, {
|
|
|
292
293
|
var toolbar = this._item.toolbar;
|
|
293
294
|
var width;
|
|
294
295
|
if (this._item.identifier == UIToolbarItem.Identifier.custom){
|
|
295
|
-
if (
|
|
296
|
-
width = this._item.minimumWidth;
|
|
297
|
-
}else if (this._item.view !== null){
|
|
296
|
+
if (this._item.view !== null){
|
|
298
297
|
width = this._item.view.intrinsicSize.width;
|
|
298
|
+
if (width === UIView.noIntrinsicSize){
|
|
299
|
+
if (this._item.minimumSize !== null){
|
|
300
|
+
width = this._item.minimumSize.width;
|
|
301
|
+
}else{
|
|
302
|
+
width = toolbar._imageSize;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
299
305
|
}else{
|
|
300
306
|
width = this._item.image.size.width * toolbar._imageSize / this._item.image.size.height;
|
|
301
307
|
}
|
|
@@ -541,7 +547,7 @@ JSClass("UIToolbarCustomStyler", UIToolbarStyler, {
|
|
|
541
547
|
itemView.index = i;
|
|
542
548
|
itemView.item = item;
|
|
543
549
|
}
|
|
544
|
-
for (var j =
|
|
550
|
+
for (var j = props.itemViews.length - 1; j >= i; --j){
|
|
545
551
|
itemView = props.itemViews.pop();
|
|
546
552
|
itemView.removeFromSuperview();
|
|
547
553
|
}
|
|
@@ -656,6 +662,8 @@ JSClass("UIToolbarCustomStyler", UIToolbarStyler, {
|
|
|
656
662
|
itemsWidth += size.width;
|
|
657
663
|
if (item.identifier === UIToolbarItem.Identifier.flexibleSpace){
|
|
658
664
|
flexibleItemSizes.push(size);
|
|
665
|
+
}else if (item.minimumSize !== null && item.maximumSize !== null && item.minimumSize.width < item.maximumSize.width){
|
|
666
|
+
flexibleItemSizes.push(size);
|
|
659
667
|
}
|
|
660
668
|
}
|
|
661
669
|
itemsWidth += (props.itemViews.length - 1) * this.itemSpacing;
|
|
@@ -395,7 +395,7 @@ JSClass('UIWindow', UIView, {
|
|
|
395
395
|
|
|
396
396
|
makeKeyAndOrderFront: function(){
|
|
397
397
|
this.orderFront();
|
|
398
|
-
this.
|
|
398
|
+
this.makeKey();
|
|
399
399
|
},
|
|
400
400
|
|
|
401
401
|
receivesAllEvents: false,
|
|
@@ -821,9 +821,7 @@ JSClass('UIWindow', UIView, {
|
|
|
821
821
|
enters.push(area);
|
|
822
822
|
}
|
|
823
823
|
}
|
|
824
|
-
|
|
825
|
-
moves.push(area);
|
|
826
|
-
}
|
|
824
|
+
moves.push(area);
|
|
827
825
|
}else{
|
|
828
826
|
if (area._entered){
|
|
829
827
|
area._entered = false;
|
|
@@ -844,6 +842,12 @@ JSClass('UIWindow', UIView, {
|
|
|
844
842
|
area = exits[areaIndex];
|
|
845
843
|
area.mouseExited(event);
|
|
846
844
|
}
|
|
845
|
+
for (areaIndex = 0, areaCount = moves.length; areaIndex < areaCount; ++areaIndex){
|
|
846
|
+
area = moves[areaIndex];
|
|
847
|
+
if (area.cursor !== null){
|
|
848
|
+
area.cursor.set();
|
|
849
|
+
}
|
|
850
|
+
}
|
|
847
851
|
}
|
|
848
852
|
if (enters.length > 0){
|
|
849
853
|
event = UIEvent.initMouseEventWithType(UIEvent.Type.mouseEntered, timestamp, this, locationInWindow, modifiers, 0);
|
|
@@ -855,8 +859,10 @@ JSClass('UIWindow', UIView, {
|
|
|
855
859
|
if (moves.length > 0){
|
|
856
860
|
event = UIEvent.initMouseEventWithType(UIEvent.Type.mouseMoved, timestamp, this, locationInWindow, modifiers, 0);
|
|
857
861
|
for (areaIndex = 0, areaCount = moves.length; areaIndex < areaCount; ++areaIndex){
|
|
858
|
-
area
|
|
859
|
-
|
|
862
|
+
if ((area.trackingType & UIMouseTrackingArea.TrackingType.move) !== 0){
|
|
863
|
+
area = moves[areaIndex];
|
|
864
|
+
area.mouseMoved(event);
|
|
865
|
+
}
|
|
860
866
|
}
|
|
861
867
|
}
|
|
862
868
|
},
|