@desynova-digital/player 4.0.76 → 4.0.78
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.
|
@@ -75,21 +75,27 @@ var PointersBar = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
75
75
|
tooltipPointer: 0
|
|
76
76
|
};
|
|
77
77
|
_this._tooltipRef = /*#__PURE__*/_react["default"].createRef();
|
|
78
|
-
|
|
78
|
+
// this.renderComp = 0;
|
|
79
79
|
_this.zoom = 0;
|
|
80
80
|
return _this;
|
|
81
81
|
}
|
|
82
|
+
|
|
83
|
+
// shouldComponentUpdate(nextProps, nextState) {
|
|
84
|
+
// if (nextProps.zoom !== this.props.zoom) {
|
|
85
|
+
// return true;
|
|
86
|
+
// } else if (_.isEqual(nextProps.markers, this.props.markers) && !this.renderComp) {
|
|
87
|
+
// return false;
|
|
88
|
+
// }
|
|
89
|
+
// this.renderComp = 0;
|
|
90
|
+
// return true;
|
|
91
|
+
// }
|
|
82
92
|
_inherits(PointersBar, _Component);
|
|
83
93
|
return _createClass(PointersBar, [{
|
|
84
|
-
key: "
|
|
85
|
-
value: function
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
} else if (_lodash["default"].isEqual(nextProps.markers, this.props.markers) && !this.renderComp) {
|
|
89
|
-
return false;
|
|
94
|
+
key: "componentDidUpdate",
|
|
95
|
+
value: function componentDidUpdate(prevProps) {
|
|
96
|
+
if (prevProps.zoom !== this.props.zoom) {
|
|
97
|
+
this.generateZoomWithOfPointersBar(this.props.zoom);
|
|
90
98
|
}
|
|
91
|
-
this.renderComp = 0;
|
|
92
|
-
return true;
|
|
93
99
|
}
|
|
94
100
|
}, {
|
|
95
101
|
key: "onMarkerClick",
|
|
@@ -145,7 +151,8 @@ var PointersBar = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
145
151
|
// tooltip.bottom = title.line1 && title.line2 ? tooltip.bottom + 22 : tooltip.bottom + 10;
|
|
146
152
|
tooltip.bottom = title.line1 && title.line2 ? 42 : 30;
|
|
147
153
|
tooltipPointer = tooltip.left = e.target.getBoundingClientRect().left + (e.target.getBoundingClientRect().right - e.target.getBoundingClientRect().left) / 2 - 100;
|
|
148
|
-
this.renderComp = 1;
|
|
154
|
+
// this.renderComp = 1;
|
|
155
|
+
|
|
149
156
|
this.setState(_objectSpread({}, tooltip), function () {
|
|
150
157
|
var tooltip = _this2.state.tooltip;
|
|
151
158
|
var viewportWidth = window.innerWidth || document.documentElement.clientWidth;
|
|
@@ -164,7 +171,7 @@ var PointersBar = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
164
171
|
}
|
|
165
172
|
}
|
|
166
173
|
tooltip.isVisible = true;
|
|
167
|
-
|
|
174
|
+
// this.renderComp = 1;
|
|
168
175
|
_this2.setState(_objectSpread(_objectSpread({}, tooltip), {}, {
|
|
169
176
|
tooltipPointer: tooltipPointer
|
|
170
177
|
}));
|
|
@@ -244,7 +251,7 @@ var PointersBar = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
244
251
|
var tooltip = _this3.state.tooltip;
|
|
245
252
|
tooltip.isVisible = false;
|
|
246
253
|
tooltip.text = null;
|
|
247
|
-
|
|
254
|
+
// this.renderComp = 1;
|
|
248
255
|
// tooltip.left = null;
|
|
249
256
|
_this3.setState(_objectSpread({}, tooltip));
|
|
250
257
|
},
|
|
@@ -31,7 +31,9 @@ function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.fre
|
|
|
31
31
|
var propTypes = {
|
|
32
32
|
player: _propTypes.PropTypes.instanceOf(Object),
|
|
33
33
|
actions: _propTypes.PropTypes.instanceOf(Object),
|
|
34
|
-
style: _propTypes.PropTypes.instanceOf(Object)
|
|
34
|
+
style: _propTypes.PropTypes.instanceOf(Object),
|
|
35
|
+
enablePlayerActions: _propTypes.PropTypes.string,
|
|
36
|
+
playerType: _propTypes.PropTypes.string
|
|
35
37
|
};
|
|
36
38
|
var defaultProps = {
|
|
37
39
|
player: {},
|
|
@@ -60,9 +62,10 @@ var ZoomMenuButton = /*#__PURE__*/function (_Component) {
|
|
|
60
62
|
value: function render() {
|
|
61
63
|
var _this$props = this.props,
|
|
62
64
|
style = _this$props.style,
|
|
63
|
-
playerType = _this$props.playerType
|
|
65
|
+
playerType = _this$props.playerType,
|
|
66
|
+
enablePlayerActions = _this$props.enablePlayerActions;
|
|
64
67
|
var vertical = false;
|
|
65
|
-
return playerType === 'subtitle' && /*#__PURE__*/_react["default"].createElement(ZoomMenu, {
|
|
68
|
+
return (playerType === 'subtitle' || enablePlayerActions.includes('zoomMenuButton')) && /*#__PURE__*/_react["default"].createElement(ZoomMenu, {
|
|
66
69
|
style: style
|
|
67
70
|
}, /*#__PURE__*/_react["default"].createElement(ZoomButton, {
|
|
68
71
|
display: "rounded",
|