bm-core-ui 2.8.2 → 2.8.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,35 @@
1
+ # 2.8.3
2
+
3
+ ## BMCollectionView
4
+
5
+ Fixed an issue that could cause drag & drop to occasionally fail when the drag status indicator was positioned below the mouse pointer.
6
+
7
+ The default value for `supportsKeyboardNavigation` has been set to `NO` to avoid side effects when upgrading from older versions.
8
+
9
+ Collection view will no longer acquire focus when its cells are clicked when keyboard navigation is disabled.
10
+
11
+ ## BMCollectionViewFlowLayout
12
+
13
+ Resolves an issue that caused keyboard navigation using the up/down arrows in vertical layout and left/right arrows in horizontal layouts to fail when using non-static cell sizes.
14
+
15
+ Resolves an issue where using the `Expand` content gravity with a horizontal layout caused the size adjustments to be applied to the cell heights instead of their widths.
16
+
17
+ Resolves an issue when using automatic cell sizes that could occur when the preliminary layout would fit in the collection view's frame after a first measurement but a scrollbar would be required after subsequent measurements.
18
+
19
+ ## BMMenu
20
+
21
+ Resolves an issue that caused the last item in menus to not be selectable using the spacebar or return key.
22
+
23
+ Resolves an issue that caused the active menu item's text to temporarily become dark and unreadable in dark mode when selected.
24
+
25
+ ## BMWindow
26
+
27
+ Resolves an issue that caused the node referenced via the `anchorNode` property to remain permanently hidden if the window was dismissed while its appear animation was in progress.
28
+
29
+ ## BMViewLayoutEditor
30
+
31
+ Resolves an issue that caused the "Deactivate Constraints" button to not work.
32
+
1
33
  # 2.8.2
2
34
 
3
35
  ## BMMonacoCodeEditor
@@ -10171,10 +10171,14 @@ export class BMCollectionViewFlowLayout extends BMCollectionViewLayout {
10171
10171
  * When using automatic cell sizes, the generator will yield execution and only calculate portions of the layout on demand.
10172
10172
  * With the exeption of the first invocation, it is required to pass an index path to the iterator's `next` method. The layout process
10173
10173
  * will continue until it fully lays out the cell for that index path, at which point it will yield again.
10174
- * @param useOffset When set to `YES` the layout will take the scrollbar size into account.
10174
+ * @param useOffset When set to `YES` the layout will take the scrollbar size into account.
10175
+ * @param targetRect When computing a layout using automatic cell sizes, this is an optional rect up to which
10176
+ * to measure cells. This is reserved for when this is invoked as a delegate.
10177
+ * @param targetIndexPath When computing a layout using automatic cell sizes, this is an optional index path up to which
10178
+ * to measure cells. This is reserved for when this is invoked as a delegate.
10175
10179
  *
10176
10180
  */
10177
- *_prepareLayoutWithScrollbarOffsetGenerator(useOffset: boolean): void;
10181
+ *_prepareLayoutWithScrollbarOffsetGenerator(useOffset: boolean, {targetRect: targetRect, targetIndexPath: targetIndexPath}?: {targetRect?: BMRect | null | undefined, targetIndexPath?: BMIndexPath | null | undefined}): void;
10178
10182
 
10179
10183
 
10180
10184
  /**
@@ -693,7 +693,7 @@ BMCollectionView.prototype = BMExtend(BM_COLLECTION_VIEW_USE_BMVIEW_SUBCLASS ? O
693
693
  /**
694
694
  * Defaults to `YES`. When set to `NO`, keyboard navigation is disabled.
695
695
  */
696
- _supportsKeyboardNavigation: YES, // <Boolean>
696
+ _supportsKeyboardNavigation: NO, // <Boolean>
697
697
 
698
698
  get supportsKeyboardNavigation() {
699
699
  return this._supportsKeyboardNavigation;
@@ -3988,7 +3988,7 @@ BMCollectionView.prototype = BMExtend(BM_COLLECTION_VIEW_USE_BMVIEW_SUBCLASS ? O
3988
3988
  if (options && options.withEvent) options.withEvent._BMOriginalTarget = cell.node;
3989
3989
 
3990
3990
  // Acquire focus if not already owned
3991
- if (document.activeElement != this.node) {
3991
+ if (document.activeElement != this.node && this._supportsKeyboardNavigation) {
3992
3992
  this.node.focus();
3993
3993
  }
3994
3994
 
@@ -4053,7 +4053,7 @@ BMCollectionView.prototype = BMExtend(BM_COLLECTION_VIEW_USE_BMVIEW_SUBCLASS ? O
4053
4053
  if (options && options.withEvent) options.withEvent._BMOriginalTarget = cell.node;
4054
4054
 
4055
4055
  // Acquire focus if not already owned
4056
- if (document.activeElement != this.node) {
4056
+ if (document.activeElement != this.node && this._supportsKeyboardNavigation) {
4057
4057
  this.node.focus();
4058
4058
  }
4059
4059
 
@@ -4075,7 +4075,7 @@ BMCollectionView.prototype = BMExtend(BM_COLLECTION_VIEW_USE_BMVIEW_SUBCLASS ? O
4075
4075
  if (options && options.withEvent) options.withEvent._BMOriginalTarget = cell.node;
4076
4076
 
4077
4077
  // Acquire focus if not already owned
4078
- if (document.activeElement != this.node) {
4078
+ if (document.activeElement != this.node && this._supportsKeyboardNavigation) {
4079
4079
  this.node.focus();
4080
4080
  }
4081
4081
 
@@ -1699,9 +1699,15 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
1699
1699
  * When using automatic cell sizes, the generator will yield execution and only calculate portions of the layout on demand.
1700
1700
  * With the exeption of the first invocation, it is required to pass an index path to the iterator's `next` method. The layout process
1701
1701
  * will continue until it fully lays out the cell for that index path, at which point it will yield again.
1702
- * @param useOffset <Boolean> When set to `YES` the layout will take the scrollbar size into account.
1702
+ * @param useOffset <Boolean> When set to `YES` the layout will take the scrollbar size into account.
1703
+ * {
1704
+ * @param targetRect <BMRect, nullable> When computing a layout using automatic cell sizes, this is an optional rect up to which
1705
+ * to measure cells. This is reserved for when this is invoked as a delegate.
1706
+ * @param targetIndexPath <BMIndexPath, nullable> When computing a layout using automatic cell sizes, this is an optional index path up to which
1707
+ * to measure cells. This is reserved for when this is invoked as a delegate.
1708
+ * }
1703
1709
  */
1704
- *_prepareLayoutWithScrollbarOffsetGenerator(useOffset) {
1710
+ *_prepareLayoutWithScrollbarOffsetGenerator(useOffset, target) {
1705
1711
 
1706
1712
  // To standardize naming in order to support the orientation setting, the following terms are used:
1707
1713
  // Length - refers to the dimension across the axis on which collection view scrolls: height for vertical and width for horizontal
@@ -1803,7 +1809,6 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
1803
1809
  targetRect?: BMRect;
1804
1810
  }
1805
1811
  */
1806
- let target;
1807
1812
 
1808
1813
  // The sections that contain the preliminary layout
1809
1814
  const preliminarySections = [];
@@ -1977,15 +1982,15 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
1977
1982
 
1978
1983
  numberOfColumns++;
1979
1984
  } while (usedLength < maximumLength && expectedSize);
1980
-
1981
- // Ensure that there is at least one column
1982
- numberOfColumns = Math.max(numberOfColumns, 1);
1983
1985
  }
1984
1986
  else {
1985
1987
  // If there is no minimum spacing required, then the number of columns is simply the available space divided
1986
1988
  // by the cell width
1987
- numberOfColumns = Math.max((maximumLength / expectedSize) | 0, 1);
1989
+ numberOfColumns = (maximumLength / expectedSize) | 0;
1988
1990
  }
1991
+
1992
+ // Ensure that there is at least one column
1993
+ numberOfColumns = Math.max(numberOfColumns, 1);
1989
1994
  }
1990
1995
 
1991
1996
  // Create the preliminary sections
@@ -2069,7 +2074,12 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
2069
2074
 
2070
2075
  cachedLayout.size = BMSizeMake(this.collectionView.frame.size.width, height);
2071
2076
 
2072
- target = yield;
2077
+ // Yield after building the preliminary layout and wait for a target rect or index path up to which to measure
2078
+ if (!target) {
2079
+ // If a target is already supplied (as a parameter) this is a delegate generator and processing should continue
2080
+ // until this target
2081
+ target = yield;
2082
+ }
2073
2083
 
2074
2084
  // When requesting a rect initially, pre-measure the cells up to that rect
2075
2085
  if (target.rect) {
@@ -2085,7 +2095,13 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
2085
2095
 
2086
2096
  cachedLayout.size = BMSizeMake(width, this.collectionView.frame.size.height);
2087
2097
 
2088
- target = yield;
2098
+ // Yield after building the preliminary layout and wait for a target rect or index path up to which to measure
2099
+ if (!target) {
2100
+ // If a target is already supplied (as a parameter) this is a delegate generator and processing should continue
2101
+ // until this target
2102
+ target = yield;
2103
+ }
2104
+
2089
2105
  // When requesting a rect initially, pre-measure the cells up to that rect
2090
2106
  if (target.rect) {
2091
2107
  measureCellsInRect(target.rect);
@@ -2220,7 +2236,15 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
2220
2236
 
2221
2237
  // If the row height exceeds the collection view frame height, perform a second layout pass to account for the scrollbars
2222
2238
  if (row[rowStartAttribute] + rowBreadth > frameSize) {
2223
- if (this.collectionView.scrollBarSize && !useOffset) return this._prepareLayoutWithScrollbarOffset(YES);
2239
+ if (this.collectionView.scrollBarSize && !useOffset) {
2240
+ if (target) {
2241
+ // With automatic cell size delegate iteration to the new invocation
2242
+ return yield *this._prepareLayoutWithScrollbarOffsetGenerator(YES, target);
2243
+ }
2244
+ else {
2245
+ return this._prepareLayoutWithScrollbarOffset(YES);
2246
+ }
2247
+ }
2224
2248
  }
2225
2249
 
2226
2250
  // if there is one
@@ -2383,7 +2407,15 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
2383
2407
 
2384
2408
  // If the total height exceeds the collection view frame height, perform a second layout pass to account for the scrollbars
2385
2409
  if (height > frameHeight) {
2386
- if (this.collectionView.scrollBarSize && !useOffset) return this._prepareLayoutWithScrollbarOffset(YES);
2410
+ if (this.collectionView.scrollBarSize && !useOffset) {
2411
+ if (target) {
2412
+ // With automatic cell size delegate iteration to the new invocation
2413
+ return yield *this._prepareLayoutWithScrollbarOffsetGenerator(YES, target);
2414
+ }
2415
+ else {
2416
+ return this._prepareLayoutWithScrollbarOffset(YES);
2417
+ }
2418
+ }
2387
2419
  }
2388
2420
  }
2389
2421
  else {
@@ -2404,7 +2436,15 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
2404
2436
 
2405
2437
  // If the total height exceeds the collection view frame height, perform a second layout pass to account for the scrollbars
2406
2438
  if (width > frameWidth) {
2407
- if (this.collectionView.scrollBarSize && !useOffset) return this._prepareLayoutWithScrollbarOffset(YES);
2439
+ if (this.collectionView.scrollBarSize && !useOffset) {
2440
+ if (target) {
2441
+ // With automatic cell size delegate iteration to the new invocation
2442
+ return yield *this._prepareLayoutWithScrollbarOffsetGenerator(YES, target);
2443
+ }
2444
+ else {
2445
+ return this._prepareLayoutWithScrollbarOffset(YES);
2446
+ }
2447
+ }
2408
2448
  }
2409
2449
  }
2410
2450
  }
@@ -2418,7 +2458,15 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
2418
2458
 
2419
2459
  // If the total height exceeds the collection view frame height, perform a second layout pass to account for the scrollbars
2420
2460
  if (height > frameHeight) {
2421
- if (this.collectionView.scrollBarSize && !useOffset) return this._prepareLayoutWithScrollbarOffset(YES);
2461
+ if (this.collectionView.scrollBarSize && !useOffset) {
2462
+ if (target) {
2463
+ // With automatic cell size delegate iteration to the new invocation
2464
+ return yield *this._prepareLayoutWithScrollbarOffsetGenerator(YES, target);
2465
+ }
2466
+ else {
2467
+ return this._prepareLayoutWithScrollbarOffset(YES);
2468
+ }
2469
+ }
2422
2470
  }
2423
2471
  }
2424
2472
  else {
@@ -2429,7 +2477,15 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
2429
2477
 
2430
2478
  // If the total height exceeds the collection view frame height, perform a second layout pass to account for the scrollbars
2431
2479
  if (width > frameWidth) {
2432
- if (this.collectionView.scrollBarSize && !useOffset) return this._prepareLayoutWithScrollbarOffset(YES);
2480
+ if (this.collectionView.scrollBarSize && !useOffset) {
2481
+ if (target) {
2482
+ // With automatic cell size delegate iteration to the new invocation
2483
+ return yield *this._prepareLayoutWithScrollbarOffsetGenerator(YES, target);
2484
+ }
2485
+ else {
2486
+ return this._prepareLayoutWithScrollbarOffset(YES);
2487
+ }
2488
+ }
2433
2489
  }
2434
2490
  }
2435
2491
 
@@ -2440,7 +2496,15 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
2440
2496
 
2441
2497
  // If the total height exceeds the collection view frame height, perform a second layout pass to account for the scrollbars
2442
2498
  if (height > frameHeight) {
2443
- if (this.collectionView.scrollBarSize && !useOffset) return this._prepareLayoutWithScrollbarOffset(YES);
2499
+ if (this.collectionView.scrollBarSize && !useOffset) {
2500
+ if (target) {
2501
+ // With automatic cell size delegate iteration to the new invocation
2502
+ return yield *this._prepareLayoutWithScrollbarOffsetGenerator(YES, target);
2503
+ }
2504
+ else {
2505
+ return this._prepareLayoutWithScrollbarOffset(YES);
2506
+ }
2507
+ }
2444
2508
  }
2445
2509
 
2446
2510
  // If the height is lower than the collection view's height, the content gravity must be applied to all cached attributes
@@ -2534,7 +2598,15 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
2534
2598
  else {
2535
2599
  // If the total height exceeds the collection view frame height, perform a second layout pass to account for the scrollbars
2536
2600
  if (width > frameWidth) {
2537
- if (this.collectionView.scrollBarSize && !useOffset) return this._prepareLayoutWithScrollbarOffset(YES);
2601
+ if (this.collectionView.scrollBarSize && !useOffset) {
2602
+ if (target) {
2603
+ // With automatic cell size delegate iteration to the new invocation
2604
+ return yield *this._prepareLayoutWithScrollbarOffsetGenerator(YES, target);
2605
+ }
2606
+ else {
2607
+ return this._prepareLayoutWithScrollbarOffset(YES);
2608
+ }
2609
+ }
2538
2610
  }
2539
2611
 
2540
2612
  // If the height is lower than the collection view's height, the content gravity must be applied to all cached attributes
@@ -2607,7 +2679,7 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
2607
2679
  const scaledRowHeight = rowWidth * scaleFactor | 0;
2608
2680
  for (const attribute of row.attributes) {
2609
2681
  attribute.frame.origin.x += displacement;
2610
- attribute.frame.size.height = attribute.frame.size.height * scaleFactor | 0;
2682
+ attribute.frame.size.width = attribute.frame.size.width * scaleFactor | 0;
2611
2683
  }
2612
2684
 
2613
2685
  // Advance the displacement based on the row's new width then displace the row end
@@ -2710,14 +2782,14 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
2710
2782
 
2711
2783
  numberOfColumns++;
2712
2784
  } while (usedLength < length && cellSize);
2713
-
2714
- numberOfColumns = Math.max(numberOfColumns, 1);
2715
2785
  }
2716
2786
  else {
2717
2787
  // If there is no minimum spacing required, then the number of columns is simply the available space divided
2718
2788
  // by the cell width
2719
- numberOfColumns = Math.max((length / cellSize) | 0, 1);
2789
+ numberOfColumns = (length / cellSize) | 0;
2720
2790
  }
2791
+
2792
+ numberOfColumns = Math.max(numberOfColumns, 1);
2721
2793
  }
2722
2794
  cachedLayout.numberOfColumns = numberOfColumns;
2723
2795
 
@@ -4489,19 +4561,22 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
4489
4561
  const row = indexPath.row;
4490
4562
 
4491
4563
  // Find the row where the current index path is
4492
- const sectionRows = this.cachedLayout.sections[section];
4564
+ const cachedSection = this.cachedLayout.sections[section];
4565
+
4566
+ if (!cachedSection) return indexPath;
4493
4567
 
4494
- if (!sectionRows) return indexPath;
4568
+ const sectionRows = cachedSection.rows;
4495
4569
 
4496
4570
  let rowIndex = 0;
4497
4571
  const rowCount = sectionRows.length;
4498
4572
  for (rowIndex; rowIndex < rowCount; rowIndex++) {
4499
- if (row.startIndex <= row && row.endIndex >= row) {
4573
+ const sectionRow = sectionRows[rowIndex];
4574
+ if (sectionRow.startIndex <= row && sectionRow.endIndex >= row) {
4500
4575
  break;
4501
4576
  }
4502
4577
  }
4503
4578
 
4504
- const attributes = sectionRows[rowIndex].attributes;
4579
+ const attributes = sectionRows[rowIndex].attributes.find(a => a.indexPath.row == row);
4505
4580
  const positionProperty = this._orientation == BMCollectionViewFlowLayoutOrientation.Vertical ? 'x' : 'y';
4506
4581
  const position = attributes.frame.center[positionProperty];
4507
4582
 
@@ -4616,19 +4691,22 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
4616
4691
  const row = indexPath.row;
4617
4692
 
4618
4693
  // Find the row where the current index path is
4619
- const sectionRows = this.cachedLayout.sections[section];
4694
+ const cachedSection = this.cachedLayout.sections[section];
4695
+
4696
+ if (!cachedSection) return indexPath;
4620
4697
 
4621
- if (!sectionRows) return indexPath;
4698
+ const sectionRows = cachedSection.rows;
4622
4699
 
4623
4700
  let rowIndex = 0;
4624
4701
  const rowCount = sectionRows.length;
4625
4702
  for (rowIndex; rowIndex < rowCount; rowIndex++) {
4626
- if (row.startIndex <= row && row.endIndex >= row) {
4703
+ const sectionRow = sectionRows[rowIndex];
4704
+ if (sectionRow.startIndex <= row && sectionRow.endIndex >= row) {
4627
4705
  break;
4628
4706
  }
4629
4707
  }
4630
4708
 
4631
- const attributes = sectionRows[rowIndex].attributes;
4709
+ const attributes = sectionRows[rowIndex].attributes.find(a => a.indexPath.row == row);
4632
4710
  const positionProperty = this._orientation == BMCollectionViewFlowLayoutOrientation.Vertical ? 'x' : 'y';
4633
4711
  const position = attributes.frame.center[positionProperty];
4634
4712
 
@@ -32,6 +32,8 @@
32
32
  position: fixed;
33
33
 
34
34
  box-shadow: 0px 4px 12px rgba(0, 0, 0, .33);
35
+
36
+ pointer-events: none;
35
37
  }
36
38
 
37
39
  .BMDragIndicatorRed {
@@ -1305,7 +1307,7 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
1305
1307
  color: rgba(255, 255, 255, .9);
1306
1308
  }
1307
1309
 
1308
- .BMLayoutEditorConstraintPopupOption:active, .BMMenuItem:active, .BMMenuTouch > .BMMenuItem:hover {
1310
+ .BMLayoutEditorConstraintPopupOption:active, .BMMenuTouch > .BMMenuItem:hover {
1309
1311
  background: transparent;
1310
1312
  color: white;
1311
1313
  }
@@ -1313,6 +1315,28 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
1313
1315
  .BMMenuTouch > .BMMenuItem {
1314
1316
  border-bottom-color: rgba(255, 255, 255, .1);
1315
1317
  }
1318
+
1319
+ @keyframes BMMenuItemActiveAnimation {
1320
+ from {
1321
+ background: transparent;
1322
+ color: rgba(255, 255, 255, .9);
1323
+ }
1324
+
1325
+ 49% {
1326
+ background: transparent;
1327
+ color: rgba(255, 255, 255, .9);
1328
+ }
1329
+
1330
+ 50% {
1331
+ background: rgb(0, 128, 255);
1332
+ color: white;
1333
+ }
1334
+
1335
+ to {
1336
+ background: rgb(0, 128, 255);
1337
+ color: white;
1338
+ }
1339
+ }
1316
1340
  }
1317
1341
 
1318
1342
  .BMLayoutEditorWorkspaceToolbarSizeClass .BMLayoutEditorConstraintPopupOption {
@@ -667,7 +667,7 @@ BMMenu.prototype = {
667
667
  },
668
668
 
669
669
  returnPressedWithEvent(event) {
670
- if (this._highlightedIndex >= 0 && this._highlightedIndex < this._items.length - 1) {
670
+ if (this._highlightedIndex >= 0 && this._highlightedIndex < this._items.length) {
671
671
  const item = this._items[this._highlightedIndex];
672
672
 
673
673
  if (item.action) item.action(item);
@@ -518,10 +518,10 @@ BMLayoutEditorSettingsDeactivateConstraintsCell.prototype = BMExtend(Object.crea
518
518
 
519
519
  buttonView.node.addEventListener('click', event => {
520
520
  if (hasOption && hasShift && hasCtrl) {
521
- new Set(this.setting.target.rootView.allConstraints).forEach(constraint => constraint.remove());
521
+ new Set(this.setting.target._view.rootView.allConstraints).forEach(constraint => constraint.remove());
522
522
  }
523
523
  else if (hasOption) {
524
- for (let constraint of this.setting.target.localConstraints) {
524
+ for (let constraint of this.setting.target._view.localConstraints) {
525
525
  if (hasShift) {
526
526
  constraint.remove();
527
527
  }
@@ -1124,6 +1124,7 @@ BMWindow.prototype = BMExtend(Object.create(BMView.prototype), {
1124
1124
  const animationNode = node.cloneNode(YES);
1125
1125
 
1126
1126
  const nodeDisplay = node.style.display;
1127
+ self._nodeDisplay = nodeDisplay;
1127
1128
 
1128
1129
  animationNode.style.position = 'fixed';
1129
1130
  animationNode.style.zIndex = BM_WINDOW_Z_INDEX_MAX + 1;
@@ -1165,6 +1166,7 @@ BMWindow.prototype = BMExtend(Object.create(BMView.prototype), {
1165
1166
  }
1166
1167
  else {
1167
1168
  node.style.display = nodeDisplay;
1169
+ self._nodeDisplay = undefined;
1168
1170
  }
1169
1171
 
1170
1172
  completionHandler();
@@ -1326,14 +1328,14 @@ BMWindow.prototype = BMExtend(Object.create(BMView.prototype), {
1326
1328
  // Create a copy of the given node which will be used in the animation in place of the original node
1327
1329
  const node = this._anchorNode;
1328
1330
 
1329
- if ('_nodeDisplay' in self) {
1331
+ if (typeof self._nodeDisplay != 'undefined') {
1330
1332
  node.style.display = self._nodeDisplay;
1331
1333
  }
1332
1334
 
1333
1335
  const rect = BMRectMakeWithNodeFrame(node);
1334
1336
  const animationNode = node.cloneNode(YES);
1335
1337
 
1336
- const nodeDisplay = ('_nodeDisplay' in self) ? self._nodeDisplay : node.style.display;
1338
+ const nodeDisplay = (typeof self._nodeDisplay != 'undefined') ? self._nodeDisplay : node.style.display;
1337
1339
  self._nodeDisplay = undefined;
1338
1340
 
1339
1341
  animationNode.style.position = 'fixed';
@@ -10171,10 +10171,14 @@ declare class BMCollectionViewFlowLayout extends BMCollectionViewLayout {
10171
10171
  * When using automatic cell sizes, the generator will yield execution and only calculate portions of the layout on demand.
10172
10172
  * With the exeption of the first invocation, it is required to pass an index path to the iterator's `next` method. The layout process
10173
10173
  * will continue until it fully lays out the cell for that index path, at which point it will yield again.
10174
- * @param useOffset When set to `YES` the layout will take the scrollbar size into account.
10174
+ * @param useOffset When set to `YES` the layout will take the scrollbar size into account.
10175
+ * @param targetRect When computing a layout using automatic cell sizes, this is an optional rect up to which
10176
+ * to measure cells. This is reserved for when this is invoked as a delegate.
10177
+ * @param targetIndexPath When computing a layout using automatic cell sizes, this is an optional index path up to which
10178
+ * to measure cells. This is reserved for when this is invoked as a delegate.
10175
10179
  *
10176
10180
  */
10177
- *_prepareLayoutWithScrollbarOffsetGenerator(useOffset: boolean): void;
10181
+ *_prepareLayoutWithScrollbarOffsetGenerator(useOffset: boolean, {targetRect: targetRect, targetIndexPath: targetIndexPath}?: {targetRect?: BMRect | null | undefined, targetIndexPath?: BMIndexPath | null | undefined}): void;
10178
10182
 
10179
10183
 
10180
10184
  /**