full-screen.src.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /**
  2. * @license Highcharts JS v7.0.2 (2019-01-17)
  3. * Advanced Highstock tools
  4. *
  5. * (c) 2010-2019 Highsoft AS
  6. * Author: Torstein Honsi
  7. *
  8. * License: www.highcharts.com/license
  9. */
  10. 'use strict';
  11. (function (factory) {
  12. if (typeof module === 'object' && module.exports) {
  13. factory['default'] = factory;
  14. module.exports = factory;
  15. } else if (typeof define === 'function' && define.amd) {
  16. define(function () {
  17. return factory;
  18. });
  19. } else {
  20. factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
  21. }
  22. }(function (Highcharts) {
  23. (function (H) {
  24. /**
  25. * (c) 2009-2019 Sebastian Bochann
  26. *
  27. * Full screen for Highcharts
  28. *
  29. * License: www.highcharts.com/license
  30. */
  31. H.FullScreen = function (container) {
  32. this.init(container.parentNode); // main div of the chart
  33. };
  34. /**
  35. * The module allows user to enable full screen mode in StockTools.
  36. * Based on default solutions in browsers.
  37. *
  38. */
  39. H.FullScreen.prototype = {
  40. /**
  41. * Init function
  42. *
  43. * @param {HTMLDOMElement} - chart div
  44. *
  45. */
  46. init: function (container) {
  47. if (container.requestFullscreen) {
  48. container.requestFullscreen();
  49. } else if (container.mozRequestFullScreen) {
  50. container.mozRequestFullScreen();
  51. } else if (container.webkitRequestFullscreen) {
  52. container.webkitRequestFullscreen();
  53. } else if (container.msRequestFullscreen) {
  54. container.msRequestFullscreen();
  55. }
  56. }
  57. };
  58. }(Highcharts));
  59. return (function () {
  60. }());
  61. }));