|
|
@@ -224,9 +224,13 @@ export default class BalloonPanelView extends View {
|
|
|
element: this.element,
|
|
|
positions: [
|
|
|
defaultPositions.southArrowNorth,
|
|
|
+ defaultPositions.southArrowNorthMiddleWest,
|
|
|
+ defaultPositions.southArrowNorthMiddleEast,
|
|
|
defaultPositions.southArrowNorthWest,
|
|
|
defaultPositions.southArrowNorthEast,
|
|
|
defaultPositions.northArrowSouth,
|
|
|
+ defaultPositions.northArrowSouthMiddleWest,
|
|
|
+ defaultPositions.northArrowSouthMiddleEast,
|
|
|
defaultPositions.northArrowSouthWest,
|
|
|
defaultPositions.northArrowSouthEast
|
|
|
],
|
|
|
@@ -435,86 +439,158 @@ BalloonPanelView._getOptimalPosition = getOptimalPosition;
|
|
|
*
|
|
|
* The available positioning functions are as follows:
|
|
|
*
|
|
|
- * **North**
|
|
|
- *
|
|
|
- * * `northArrowSouth`
|
|
|
*
|
|
|
- * +-----------------+
|
|
|
- * | Balloon |
|
|
|
- * +-----------------+
|
|
|
- * V
|
|
|
- * [ Target ]
|
|
|
*
|
|
|
- * * `northArrowSouthEast`
|
|
|
+ * **North west**
|
|
|
*
|
|
|
- * +-----------------+
|
|
|
- * | Balloon |
|
|
|
- * +-----------------+
|
|
|
- * V
|
|
|
- * [ Target ]
|
|
|
+ * * `northWestArrowSouthWest`
|
|
|
*
|
|
|
- * * `northArrowSouthWest`
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
*
|
|
|
- * +-----------------+
|
|
|
- * | Balloon |
|
|
|
- * +-----------------+
|
|
|
- * V
|
|
|
- * [ Target ]
|
|
|
+ * * `northWestArrowSouthMiddleWest`
|
|
|
*
|
|
|
- * **North west**
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
*
|
|
|
* * `northWestArrowSouth`
|
|
|
*
|
|
|
- * +-----------------+
|
|
|
- * | Balloon |
|
|
|
- * +-----------------+
|
|
|
- * V
|
|
|
- * [ Target ]
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
*
|
|
|
- * * `northWestArrowSouthWest`
|
|
|
+ * * `northWestArrowSouthMiddleEast`
|
|
|
*
|
|
|
- * +-----------------+
|
|
|
- * | Balloon |
|
|
|
- * +-----------------+
|
|
|
- * V
|
|
|
- * [ Target ]
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
*
|
|
|
* * `northWestArrowSouthEast`
|
|
|
*
|
|
|
- * +-----------------+
|
|
|
- * | Balloon |
|
|
|
- * +-----------------+
|
|
|
- * V
|
|
|
- * [ Target ]
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
+ *
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * **North**
|
|
|
+ *
|
|
|
+ * * `northArrowSouthWest`
|
|
|
+ *
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
+ *
|
|
|
+ * * `northArrowSouthMiddleWest`
|
|
|
+ *
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
+ *
|
|
|
+ * * `northArrowSouth`
|
|
|
+ *
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
+ *
|
|
|
+ * * `northArrowSouthMiddleEast`
|
|
|
+ *
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
+ *
|
|
|
+ * * `northArrowSouthEast`
|
|
|
+ *
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
*
|
|
|
* **North east**
|
|
|
*
|
|
|
+ * * `northEastArrowSouthWest`
|
|
|
+ *
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * * `northEastArrowSouthMiddleWest`
|
|
|
+ *
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
+ *
|
|
|
* * `northEastArrowSouth`
|
|
|
*
|
|
|
- * +-----------------+
|
|
|
- * | Balloon |
|
|
|
- * +-----------------+
|
|
|
- * V
|
|
|
- * [ Target ]
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
+ *
|
|
|
+ * * `northEastArrowSouthMiddleEast`
|
|
|
+ *
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
*
|
|
|
* * `northEastArrowSouthEast`
|
|
|
*
|
|
|
- * +-----------------+
|
|
|
- * | Balloon |
|
|
|
- * +-----------------+
|
|
|
- * V
|
|
|
- * [ Target ]
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ * V
|
|
|
+ * [ Target ]
|
|
|
*
|
|
|
- * * `northEastArrowSouthWest`
|
|
|
*
|
|
|
- * +-----------------+
|
|
|
- * | Balloon |
|
|
|
- * +-----------------+
|
|
|
- * V
|
|
|
- * [ Target ]
|
|
|
*
|
|
|
* **South**
|
|
|
*
|
|
|
+ *
|
|
|
+ * * `southArrowNorthWest`
|
|
|
+ *
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ *
|
|
|
+ * * `southArrowNorthMiddleWest`
|
|
|
+ *
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ *
|
|
|
* * `southArrowNorth`
|
|
|
*
|
|
|
* [ Target ]
|
|
|
@@ -523,24 +599,42 @@ BalloonPanelView._getOptimalPosition = getOptimalPosition;
|
|
|
* | Balloon |
|
|
|
* +-----------------+
|
|
|
*
|
|
|
+ * * `southArrowNorthMiddleEast`
|
|
|
+ *
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ *
|
|
|
* * `southArrowNorthEast`
|
|
|
*
|
|
|
- * [ Target ]
|
|
|
- * ^
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
* +-----------------+
|
|
|
* | Balloon |
|
|
|
* +-----------------+
|
|
|
*
|
|
|
- * * `southArrowNorthWest`
|
|
|
*
|
|
|
- * [ Target ]
|
|
|
- * ^
|
|
|
- * +-----------------+
|
|
|
- * | Balloon |
|
|
|
- * +-----------------+
|
|
|
*
|
|
|
* **South west**
|
|
|
*
|
|
|
+ * * `southWestArrowNorthWest`
|
|
|
+ *
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ *
|
|
|
+ * * `southWestArrowNorthMiddleWest`
|
|
|
+ *
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ *
|
|
|
* * `southWestArrowNorth`
|
|
|
*
|
|
|
* [ Target ]
|
|
|
@@ -549,24 +643,41 @@ BalloonPanelView._getOptimalPosition = getOptimalPosition;
|
|
|
* | Balloon |
|
|
|
* +-----------------+
|
|
|
*
|
|
|
- * * `southWestArrowNorthWest`
|
|
|
+ * * `southWestArrowNorthMiddleEast`
|
|
|
*
|
|
|
- * [ Target ]
|
|
|
- * ^
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
* +-----------------+
|
|
|
* | Balloon |
|
|
|
* +-----------------+
|
|
|
*
|
|
|
* * `southWestArrowNorthEast`
|
|
|
*
|
|
|
- * [ Target ]
|
|
|
- * ^
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
* +-----------------+
|
|
|
* | Balloon |
|
|
|
* +-----------------+
|
|
|
*
|
|
|
+ *
|
|
|
+ *
|
|
|
* **South east**
|
|
|
*
|
|
|
+ * * `southEastArrowNorthWest`
|
|
|
+ *
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+* * `southEastArrowNorthMiddleWest`
|
|
|
+ *
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
+ *
|
|
|
* * `southEastArrowNorth`
|
|
|
*
|
|
|
* [ Target ]
|
|
|
@@ -575,21 +686,22 @@ BalloonPanelView._getOptimalPosition = getOptimalPosition;
|
|
|
* | Balloon |
|
|
|
* +-----------------+
|
|
|
*
|
|
|
- * * `southEastArrowNorthEast`
|
|
|
+ * * `southEastArrowNorthMiddleEast`
|
|
|
*
|
|
|
- * [ Target ]
|
|
|
- * ^
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
* +-----------------+
|
|
|
* | Balloon |
|
|
|
* +-----------------+
|
|
|
*
|
|
|
- * * `southEastArrowNorthWest`
|
|
|
+ * * `southEastArrowNorthEast`
|
|
|
+ *
|
|
|
+ * [ Target ]
|
|
|
+ * ^
|
|
|
+ * +-----------------+
|
|
|
+ * | Balloon |
|
|
|
+ * +-----------------+
|
|
|
*
|
|
|
- * [ Target ]
|
|
|
- * ^
|
|
|
- * +-----------------+
|
|
|
- * | Balloon |
|
|
|
- * +-----------------+
|
|
|
*
|
|
|
* See {@link module:ui/panel/balloon/balloonpanelview~BalloonPanelView#attachTo}.
|
|
|
*
|
|
|
@@ -601,125 +713,196 @@ BalloonPanelView._getOptimalPosition = getOptimalPosition;
|
|
|
* @member {Object} module:ui/panel/balloon/balloonpanelview~BalloonPanelView.defaultPositions
|
|
|
*/
|
|
|
BalloonPanelView.defaultPositions = {
|
|
|
- // ------- North
|
|
|
|
|
|
- northArrowSouth: ( targetRect, balloonRect ) => ( {
|
|
|
+ // ------- North west
|
|
|
+
|
|
|
+ northWestArrowSouthWest: ( targetRect, balloonRect ) => ( {
|
|
|
top: getNorthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,
|
|
|
+ left: targetRect.left - BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_sw'
|
|
|
+ } ),
|
|
|
+
|
|
|
+ northWestArrowSouthMiddleWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getNorthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.left - ( balloonRect.width * .25 ) - BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_smw'
|
|
|
+ } ),
|
|
|
+
|
|
|
+ northWestArrowSouth: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getNorthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.left - balloonRect.width / 2,
|
|
|
name: 'arrow_s'
|
|
|
} ),
|
|
|
|
|
|
- northArrowSouthEast: ( targetRect, balloonRect ) => ( {
|
|
|
+ northWestArrowSouthMiddleEast: ( targetRect, balloonRect ) => ( {
|
|
|
top: getNorthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.left + targetRect.width / 2 - balloonRect.width + BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ left: targetRect.left - ( balloonRect.width * .75 ) + BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_sme'
|
|
|
+ } ),
|
|
|
+
|
|
|
+ northWestArrowSouthEast: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getNorthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.left - balloonRect.width + BalloonPanelView.arrowHorizontalOffset,
|
|
|
name: 'arrow_se'
|
|
|
} ),
|
|
|
|
|
|
+ // ------- North
|
|
|
+
|
|
|
northArrowSouthWest: ( targetRect, balloonRect ) => ( {
|
|
|
top: getNorthTop( targetRect, balloonRect ),
|
|
|
left: targetRect.left + targetRect.width / 2 - BalloonPanelView.arrowHorizontalOffset,
|
|
|
name: 'arrow_sw'
|
|
|
} ),
|
|
|
|
|
|
- // ------- North west
|
|
|
+ northArrowSouthMiddleWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getNorthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.left + targetRect.width / 2 - ( balloonRect.width * .25 ) - BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_smw'
|
|
|
+ } ),
|
|
|
|
|
|
- northWestArrowSouth: ( targetRect, balloonRect ) => ( {
|
|
|
+ northArrowSouth: ( targetRect, balloonRect ) => ( {
|
|
|
top: getNorthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.left - balloonRect.width / 2,
|
|
|
+ left: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,
|
|
|
name: 'arrow_s'
|
|
|
} ),
|
|
|
|
|
|
- northWestArrowSouthWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ northArrowSouthMiddleEast: ( targetRect, balloonRect ) => ( {
|
|
|
top: getNorthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.left - BalloonPanelView.arrowHorizontalOffset,
|
|
|
- name: 'arrow_sw'
|
|
|
+ left: targetRect.left + targetRect.width / 2 - ( balloonRect.width * .75 ) + BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_sme'
|
|
|
} ),
|
|
|
|
|
|
- northWestArrowSouthEast: ( targetRect, balloonRect ) => ( {
|
|
|
+ northArrowSouthEast: ( targetRect, balloonRect ) => ( {
|
|
|
top: getNorthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.left - balloonRect.width + BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ left: targetRect.left + targetRect.width / 2 - balloonRect.width + BalloonPanelView.arrowHorizontalOffset,
|
|
|
name: 'arrow_se'
|
|
|
} ),
|
|
|
|
|
|
// ------- North east
|
|
|
|
|
|
+ northEastArrowSouthWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getNorthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.right - BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_sw'
|
|
|
+ } ),
|
|
|
+
|
|
|
+ northEastArrowSouthMiddleWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getNorthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.right - ( balloonRect.width * .25 ) - BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_smw'
|
|
|
+ } ),
|
|
|
northEastArrowSouth: ( targetRect, balloonRect ) => ( {
|
|
|
top: getNorthTop( targetRect, balloonRect ),
|
|
|
left: targetRect.right - balloonRect.width / 2,
|
|
|
name: 'arrow_s'
|
|
|
} ),
|
|
|
|
|
|
+ northEastArrowSouthMiddleEast: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getNorthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.right - ( balloonRect.width * .75 ) + BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_sme'
|
|
|
+ } ),
|
|
|
+
|
|
|
northEastArrowSouthEast: ( targetRect, balloonRect ) => ( {
|
|
|
top: getNorthTop( targetRect, balloonRect ),
|
|
|
left: targetRect.right - balloonRect.width + BalloonPanelView.arrowHorizontalOffset,
|
|
|
name: 'arrow_se'
|
|
|
} ),
|
|
|
+ // ------- South west
|
|
|
|
|
|
- northEastArrowSouthWest: ( targetRect, balloonRect ) => ( {
|
|
|
- top: getNorthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.right - BalloonPanelView.arrowHorizontalOffset,
|
|
|
- name: 'arrow_sw'
|
|
|
+ southWestArrowNorthWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getSouthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.left - BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_nw'
|
|
|
} ),
|
|
|
|
|
|
- // ------- South
|
|
|
+ southWestArrowNorthMiddleWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getSouthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.left - ( balloonRect.width * .25 ) - BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_nmw'
|
|
|
+ } ),
|
|
|
|
|
|
- southArrowNorth: ( targetRect, balloonRect ) => ( {
|
|
|
+ southWestArrowNorth: ( targetRect, balloonRect ) => ( {
|
|
|
top: getSouthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,
|
|
|
+ left: targetRect.left - balloonRect.width / 2,
|
|
|
name: 'arrow_n'
|
|
|
} ),
|
|
|
|
|
|
- southArrowNorthEast: ( targetRect, balloonRect ) => ( {
|
|
|
+ southWestArrowNorthMiddleEast: ( targetRect, balloonRect ) => ( {
|
|
|
top: getSouthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.left + targetRect.width / 2 - balloonRect.width + BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ left: targetRect.left - ( balloonRect.width * .75 ) + BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_nme'
|
|
|
+ } ),
|
|
|
+
|
|
|
+ southWestArrowNorthEast: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getSouthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.left - balloonRect.width + BalloonPanelView.arrowHorizontalOffset,
|
|
|
name: 'arrow_ne'
|
|
|
} ),
|
|
|
|
|
|
+ // ------- South
|
|
|
+
|
|
|
southArrowNorthWest: ( targetRect, balloonRect ) => ( {
|
|
|
top: getSouthTop( targetRect, balloonRect ),
|
|
|
left: targetRect.left + targetRect.width / 2 - BalloonPanelView.arrowHorizontalOffset,
|
|
|
name: 'arrow_nw'
|
|
|
} ),
|
|
|
+ southArrowNorthMiddleWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getSouthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.left + targetRect.width / 2 - ( balloonRect.width * 0.25 ) - BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_nmw'
|
|
|
+ } ),
|
|
|
|
|
|
- // ------- South west
|
|
|
-
|
|
|
- southWestArrowNorth: ( targetRect, balloonRect ) => ( {
|
|
|
+ southArrowNorth: ( targetRect, balloonRect ) => ( {
|
|
|
top: getSouthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.left - balloonRect.width / 2,
|
|
|
+ left: targetRect.left + targetRect.width / 2 - balloonRect.width / 2,
|
|
|
name: 'arrow_n'
|
|
|
} ),
|
|
|
|
|
|
- southWestArrowNorthWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ southArrowNorthMiddleEast: ( targetRect, balloonRect ) => ( {
|
|
|
top: getSouthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.left - BalloonPanelView.arrowHorizontalOffset,
|
|
|
- name: 'arrow_nw'
|
|
|
+ left: targetRect.left + targetRect.width / 2 - ( balloonRect.width * 0.75 ) + BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_nme'
|
|
|
} ),
|
|
|
|
|
|
- southWestArrowNorthEast: ( targetRect, balloonRect ) => ( {
|
|
|
+ southArrowNorthEast: ( targetRect, balloonRect ) => ( {
|
|
|
top: getSouthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.left - balloonRect.width + BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ left: targetRect.left + targetRect.width / 2 - balloonRect.width + BalloonPanelView.arrowHorizontalOffset,
|
|
|
name: 'arrow_ne'
|
|
|
} ),
|
|
|
|
|
|
// ------- South east
|
|
|
|
|
|
+ southEastArrowNorthWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getSouthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.right - BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_nw'
|
|
|
+ } ),
|
|
|
+
|
|
|
+ southEastArrowNorthMiddleWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ top: getSouthTop( targetRect, balloonRect ),
|
|
|
+ left: targetRect.right - ( balloonRect.width * .25 ) - BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_nmw'
|
|
|
+ } ),
|
|
|
+
|
|
|
southEastArrowNorth: ( targetRect, balloonRect ) => ( {
|
|
|
top: getSouthTop( targetRect, balloonRect ),
|
|
|
left: targetRect.right - balloonRect.width / 2,
|
|
|
name: 'arrow_n'
|
|
|
} ),
|
|
|
|
|
|
- southEastArrowNorthEast: ( targetRect, balloonRect ) => ( {
|
|
|
+ southEastArrowNorthMiddleEast: ( targetRect, balloonRect ) => ( {
|
|
|
top: getSouthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.right - balloonRect.width + BalloonPanelView.arrowHorizontalOffset,
|
|
|
- name: 'arrow_ne'
|
|
|
+ left: targetRect.right - ( balloonRect.width * .75 ) + BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_nme'
|
|
|
} ),
|
|
|
|
|
|
- southEastArrowNorthWest: ( targetRect, balloonRect ) => ( {
|
|
|
+ southEastArrowNorthEast: ( targetRect, balloonRect ) => ( {
|
|
|
top: getSouthTop( targetRect, balloonRect ),
|
|
|
- left: targetRect.right - BalloonPanelView.arrowHorizontalOffset,
|
|
|
- name: 'arrow_nw'
|
|
|
+ left: targetRect.right - balloonRect.width + BalloonPanelView.arrowHorizontalOffset,
|
|
|
+ name: 'arrow_ne'
|
|
|
} )
|
|
|
+
|
|
|
};
|
|
|
|
|
|
// Returns the top coordinate for positions starting with `north*`.
|