@playkit-js/hotspots 3.1.10 → 3.1.11
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/package.json
CHANGED
|
@@ -45,6 +45,9 @@ const defaultProps = {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
function prepareUrl(url: string): string {
|
|
48
|
+
if (url.startsWith('mailto:')) {
|
|
49
|
+
return url;
|
|
50
|
+
}
|
|
48
51
|
if (!url.match(/^https?:\/\//i)) {
|
|
49
52
|
url = 'http://' + url;
|
|
50
53
|
}
|
|
@@ -176,7 +179,7 @@ export default class Hotspot extends Component<Props, State> {
|
|
|
176
179
|
|
|
177
180
|
document.body.removeChild(textEl);
|
|
178
181
|
return fontSizeToUse;
|
|
179
|
-
}
|
|
182
|
+
};
|
|
180
183
|
|
|
181
184
|
createDivElement = (): HTMLDivElement => {
|
|
182
185
|
let divEl = document.createElement('div');
|
|
@@ -187,7 +190,7 @@ export default class Hotspot extends Component<Props, State> {
|
|
|
187
190
|
divEl.style.wordBreak = 'break-all';
|
|
188
191
|
divEl.style.textRendering = 'geometricPrecision';
|
|
189
192
|
return divEl;
|
|
190
|
-
}
|
|
193
|
+
};
|
|
191
194
|
|
|
192
195
|
render() {
|
|
193
196
|
const {hotspot} = this.props;
|