UNPKG

25.3 kBSource Map (JSON)View Raw
1{"version":3,"file":"lg-rotate.umd.js","sources":["../../../src/lg-events.ts","../../../src/plugins/rotate/lg-rotate-settings.ts","../../../src/plugins/rotate/lg-rotate.ts"],"sourcesContent":["import { LightGallery } from './lightgallery';\nimport { VideoSource } from './plugins/video/types';\n\n/**\n * List of lightGallery events\n * All events should be documented here\n * Below interfaces are used to build the website documentations\n * */\nexport const lGEvents: {\n [key: string]: string;\n} = {\n afterAppendSlide: 'lgAfterAppendSlide',\n init: 'lgInit',\n hasVideo: 'lgHasVideo',\n containerResize: 'lgContainerResize',\n updateSlides: 'lgUpdateSlides',\n afterAppendSubHtml: 'lgAfterAppendSubHtml',\n beforeOpen: 'lgBeforeOpen',\n afterOpen: 'lgAfterOpen',\n slideItemLoad: 'lgSlideItemLoad',\n beforeSlide: 'lgBeforeSlide',\n afterSlide: 'lgAfterSlide',\n posterClick: 'lgPosterClick',\n dragStart: 'lgDragStart',\n dragMove: 'lgDragMove',\n dragEnd: 'lgDragEnd',\n beforeNextSlide: 'lgBeforeNextSlide',\n beforePrevSlide: 'lgBeforePrevSlide',\n beforeClose: 'lgBeforeClose',\n afterClose: 'lgAfterClose',\n rotateLeft: 'lgRotateLeft',\n rotateRight: 'lgRotateRight',\n flipHorizontal: 'lgFlipHorizontal',\n flipVertical: 'lgFlipVertical',\n autoplay: 'lgAutoplay',\n autoplayStart: 'lgAutoplayStart',\n autoplayStop: 'lgAutoplayStop',\n};\n\n// Follow the below format for the event documentation\n// @method is the method name when event is used with Angular/React components\n\n/**\n * Fired only once when lightGallery is initialized\n * @name lgInit\n * @method onInit\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action on lightGallery initialization.\n * // Init event returns the plugin instance that can be used to call any lightGalley public method\n * let pluginInstance = null;\n * lg.addEventListener('lgInit', (event) => {\n * pluginInstance = event.detail.instance;\n * });\n * lightGallery(lg);\n * @see <a href=\"/docs/methods\">Methods<a>\n */\nexport interface InitDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired when the slide content has been inserted into it's slide container.\n * @name lgAfterAppendSlide\n * @method onAfterAppendSlide\n */\nexport interface AfterAppendSlideEventDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired immediately before opening the gallery\n * @name lgBeforeOpen\n * @method onBeforeOpen\n */\nexport interface BeforeOpenDetail {}\n\n/**\n * Fired immediately after opening the gallery\n * @name lgAfterOpen\n * @method onAfterOpen\n */\nexport interface AfterOpenDetail {}\n\n/**\n * Fired once the media inside the slide has been completely loaded .\n * @name lgSlideItemLoad\n * @method onSlideItemLoad\n */\nexport interface SlideItemLoadDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * For the first slide, lightGallery adds some delay for displaying the loaded slide item.\n * This delay is required for the transition effect when the slide item is displayed\n * Respect the delay when you use this event\n */\n delay: number;\n\n // Will be true for the first slide\n isFirstSlide: boolean;\n}\n\n/**\n * Fired immediately before each slide transition.\n * @name lgBeforeSlide\n * @method onBeforeSlide\n * @example\n * const lg = document.getElementById('custom-events-demo');\n * // Perform any action before each slide transition\n * lg.addEventListener('lgBeforeSlide', (event) => {\n * const { index, prevIndex } = event.detail;\n * alert(index, prevIndex);\n * });\n * lightGallery(lg);\n */\nexport interface BeforeSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired immediately after each slide transition.\n * @name lgAfterSlide\n * @method onAfterSlide\n */\nexport interface AfterSlideDetail {\n /**\n * Index of the previous slide\n */\n prevIndex: number;\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n /**\n * true if slide function called via thumbnail click\n */\n fromThumb: boolean;\n}\n\n/**\n * Fired when the video poster is clicked.\n * @name lgPosterClick\n * @method onPosterClick\n */\nexport interface PosterClickDetail {}\n\n/**\n * Fired when the drag event to move to different slide starts.\n * @name lgDragStart\n * @method onDragStart\n */\nexport interface DragStartDetail {}\n\n/**\n * Fired periodically during the drag operation.\n * @name lgDragMove\n * @method onDragMove\n */\nexport interface DragMoveDetail {}\n\n/**\n * Fired when the user has finished the drag operation\n * @name lgDragEnd\n * @method onDragEnd\n */\nexport interface DragEndDetail {}\n\n/**\n * Fired immediately before the start of the close process.\n * @name lgBeforeClose\n * @method onBeforeClose\n */\nexport interface BeforeCloseDetail {}\n\n/**\n * Fired immediately once lightGallery is closed.\n * @name lgAfterClose\n * @method onAfterClose\n */\nexport interface AfterCloseDetail {\n /**\n * lightGallery plugin instance\n */\n instance: LightGallery;\n}\n\n/**\n * Fired immediately before each \"next\" slide transition\n * @name lgBeforeNextSlide\n * @method onBeforeNextSlide\n */\nexport interface BeforeNextSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired immediately before each \"prev\" slide transition\n * @name lgBeforePrevSlide\n * @method onBeforePrevSlide\n */\nexport interface BeforePrevSlideDetail {\n /**\n * Index of the slide\n */\n index: number;\n /**\n * true if slide function called via touch event or mouse drag\n */\n fromTouch: boolean;\n}\n\n/**\n * Fired when the sub-html content (ex : title/ description) has been appended into the slide.\n * @name lgAfterAppendSubHtml\n * @method onAfterAppendSubHtml\n */\nexport interface AfterAppendSubHtmlDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the lightGallery container has been resized.\n * @name lgContainerResize\n * @method onContainerResize\n */\nexport interface ContainerResizeDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when lightGallery detects video slide\n * @name lgHasVideo\n * @method onHasVideo\n */\nexport interface HasVideoDetail {\n /**\n * Index of the slide,\n */\n index: number;\n /**\n * Video source\n */\n src: string;\n /**\n * HTML5 video source if available\n * <p>\n HTML5 video source = source: {\n src: string;\n type: string;\n }[];\n attributes: HTMLVideoElement;\n * </p>\n */\n html5Video: VideoSource;\n /**\n * True if video has poster\n */\n hasPoster: boolean;\n}\n\n/**\n * Fired when the image is rotated in anticlockwise direction\n * @name lgRotateLeft\n * @method onRotateLeft\n */\nexport interface RotateLeftDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is rotated in clockwise direction\n * @name lgRotateRight\n * @method onRotateRight\n */\nexport interface RotateRightDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped horizontally\n * @name lgFlipHorizontal\n * @method onFlipHorizontal\n */\nexport interface FlipHorizontalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n\n/**\n * Fired when the image is flipped vertically\n * @name lgFlipVertical\n * @method onFlipVertical\n */\nexport interface FlipVerticalDetail {\n /**\n * Index of the slide\n */\n index: number;\n}\n","export interface RotateStrings {\n flipVertical: string;\n flipHorizontal: string;\n rotateLeft: string;\n rotateRight: string;\n}\n\nexport interface RotateSettings {\n /**\n * Enable/Disable rotate option\n */\n rotate: boolean;\n\n /**\n * Rotate speed in milliseconds\n */\n rotateSpeed: number;\n\n /**\n * Enable rotate left.\n */\n rotateLeft: boolean;\n\n /**\n * Enable rotate right.\n */\n rotateRight: boolean;\n\n /**\n * Enable flip horizontal.\n */\n flipHorizontal: boolean;\n\n /**\n * Enable flip vertical.\n */\n flipVertical: boolean;\n\n /**\n * Custom translation strings for aria-labels\n */\n rotatePluginStrings: RotateStrings;\n}\nexport const rotateSettings = {\n rotate: true,\n rotateSpeed: 400,\n rotateLeft: true,\n rotateRight: true,\n flipHorizontal: true,\n flipVertical: true,\n rotatePluginStrings: {\n flipVertical: 'Flip vertical',\n flipHorizontal: 'Flip horizontal',\n rotateLeft: 'Rotate left',\n rotateRight: 'Rotate right',\n } as RotateStrings,\n};\n","import { lGEvents } from '../../lg-events';\nimport { LgQuery } from '../../lgQuery';\nimport { LightGallery } from '../../lightgallery';\nimport { rotateSettings, RotateSettings } from './lg-rotate-settings';\n\nexport default class Rotate {\n core: LightGallery;\n settings: RotateSettings;\n rotateValuesList!: {\n [key: string]: any;\n };\n private $LG!: LgQuery;\n constructor(instance: LightGallery, $LG: LgQuery) {\n // get lightGallery core plugin instance\n this.core = instance;\n this.$LG = $LG;\n\n // extend module default settings with lightGallery core settings\n this.settings = {\n ...rotateSettings,\n ...this.core.settings,\n };\n\n return this;\n }\n buildTemplates(): void {\n let rotateIcons = '';\n if (this.settings.flipVertical) {\n rotateIcons += `<button type=\"button\" id=\"lg-flip-ver\" aria-label=\"${this.settings.rotatePluginStrings['flipVertical']}\" class=\"lg-flip-ver lg-icon\"></button>`;\n }\n if (this.settings.flipHorizontal) {\n rotateIcons += `<button type=\"button\" id=\"lg-flip-hor\" aria-label=\"${this.settings.rotatePluginStrings['flipHorizontal']}\" class=\"lg-flip-hor lg-icon\"></button>`;\n }\n if (this.settings.rotateLeft) {\n rotateIcons += `<button type=\"button\" id=\"lg-rotate-left\" aria-label=\"${this.settings.rotatePluginStrings['rotateLeft']}\" class=\"lg-rotate-left lg-icon\"></button>`;\n }\n if (this.settings.rotateRight) {\n rotateIcons += `<button type=\"button\" id=\"lg-rotate-right\" aria-label=\"${this.settings.rotatePluginStrings['rotateRight']}\" class=\"lg-rotate-right lg-icon\"></button>`;\n }\n this.core.$toolbar.append(rotateIcons);\n }\n\n init(): void {\n if (!this.settings.rotate) {\n return;\n }\n this.buildTemplates();\n\n // Save rotate config for each item to persist its rotate, flip values\n // even after navigating to diferent slides\n this.rotateValuesList = {};\n\n // event triggered after appending slide content\n this.core.LGel.on(`${lGEvents.slideItemLoad}.rotate`, (event) => {\n const { index } = event.detail;\n\n const rotateEl = this.core\n .getSlideItem(index)\n .find('.lg-img-rotate')\n .get();\n if (!rotateEl) {\n const imageWrap = this.core\n .getSlideItem(index)\n .find('.lg-object')\n .first();\n\n imageWrap.wrap('lg-img-rotate');\n //this.rotateValuesList[this.core.index]\n this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .css(\n 'transition-duration',\n this.settings.rotateSpeed + 'ms',\n );\n }\n });\n\n this.core.outer\n .find('#lg-rotate-left')\n .first()\n .on('click.lg', this.rotateLeft.bind(this));\n\n this.core.outer\n .find('#lg-rotate-right')\n .first()\n .on('click.lg', this.rotateRight.bind(this));\n\n this.core.outer\n .find('#lg-flip-hor')\n .first()\n .on('click.lg', this.flipHorizontal.bind(this));\n\n this.core.outer\n .find('#lg-flip-ver')\n .first()\n .on('click.lg', this.flipVertical.bind(this));\n\n // Reset rotate on slide change\n this.core.LGel.on(`${lGEvents.beforeSlide}.rotate`, (event) => {\n if (!this.rotateValuesList[event.detail.index]) {\n this.rotateValuesList[event.detail.index] = {\n rotate: 0,\n flipHorizontal: 1,\n flipVertical: 1,\n };\n }\n });\n }\n\n applyStyles(): void {\n const $image = this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .first();\n\n $image.css(\n 'transform',\n 'rotate(' +\n this.rotateValuesList[this.core.index].rotate +\n 'deg)' +\n ' scale3d(' +\n this.rotateValuesList[this.core.index].flipHorizontal +\n ', ' +\n this.rotateValuesList[this.core.index].flipVertical +\n ', 1)',\n );\n }\n\n rotateLeft(): void {\n this.rotateValuesList[this.core.index].rotate -= 90;\n this.applyStyles();\n this.triggerEvents(lGEvents.rotateLeft, {\n rotate: this.rotateValuesList[this.core.index].rotate,\n });\n }\n\n rotateRight(): void {\n this.rotateValuesList[this.core.index].rotate += 90;\n this.applyStyles();\n this.triggerEvents(lGEvents.rotateRight, {\n rotate: this.rotateValuesList[this.core.index].rotate,\n });\n }\n\n getCurrentRotation(el: HTMLElement): number {\n if (!el) {\n return 0;\n }\n const st = this.$LG(el).style();\n const tm =\n st.getPropertyValue('-webkit-transform') ||\n st.getPropertyValue('-moz-transform') ||\n st.getPropertyValue('-ms-transform') ||\n st.getPropertyValue('-o-transform') ||\n st.getPropertyValue('transform') ||\n 'none';\n if (tm !== 'none') {\n const values = tm.split('(')[1].split(')')[0].split(',') as any;\n if (values) {\n const angle = Math.round(\n Math.atan2(values[1], values[0]) * (180 / Math.PI),\n );\n return angle < 0 ? angle + 360 : angle;\n }\n }\n return 0;\n }\n\n flipHorizontal(): void {\n const rotateEl = this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .first()\n .get();\n const currentRotation = this.getCurrentRotation(rotateEl);\n let rotateAxis = 'flipHorizontal';\n if (currentRotation === 90 || currentRotation === 270) {\n rotateAxis = 'flipVertical';\n }\n this.rotateValuesList[this.core.index][rotateAxis] *= -1;\n this.applyStyles();\n this.triggerEvents(lGEvents.flipHorizontal, {\n flipHorizontal: this.rotateValuesList[this.core.index][rotateAxis],\n });\n }\n\n flipVertical(): void {\n const rotateEl = this.core\n .getSlideItem(this.core.index)\n .find('.lg-img-rotate')\n .first()\n .get();\n const currentRotation = this.getCurrentRotation(rotateEl);\n let rotateAxis = 'flipVertical';\n if (currentRotation === 90 || currentRotation === 270) {\n rotateAxis = 'flipHorizontal';\n }\n this.rotateValuesList[this.core.index][rotateAxis] *= -1;\n\n this.applyStyles();\n\n this.triggerEvents(lGEvents.flipVertical, {\n flipVertical: this.rotateValuesList[this.core.index][rotateAxis],\n });\n }\n\n triggerEvents(event: string, detail: any): void {\n setTimeout(() => {\n this.core.LGel.trigger(event, detail);\n }, this.settings.rotateSpeed + 10);\n }\n\n isImageOrientationChanged(): boolean {\n const rotateValue = this.rotateValuesList[this.core.index];\n const isRotated = Math.abs(rotateValue.rotate) % 360 !== 0;\n const ifFlippedHor = rotateValue.flipHorizontal < 0;\n const ifFlippedVer = rotateValue.flipVertical < 0;\n return isRotated || ifFlippedHor || ifFlippedVer;\n }\n\n closeGallery(): void {\n if (this.isImageOrientationChanged()) {\n this.core.getSlideItem(this.core.index).css('opacity', 0);\n }\n this.rotateValuesList = {};\n }\n\n destroy(): void {\n // Unbind all events added by lightGallery rotate plugin\n this.core.LGel.off('.lg.rotate');\n this.core.LG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