���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /var/www/html/lnovel/layout/default/node_modules/summernote/src/js/module/ |
import $ from 'jquery'; export default class Fullscreen { constructor(context) { this.context = context; this.$editor = context.layoutInfo.editor; this.$toolbar = context.layoutInfo.toolbar; this.$editable = context.layoutInfo.editable; this.$codable = context.layoutInfo.codable; this.$window = $(window); this.$scrollbar = $('html, body'); this.scrollbarClassName = 'note-fullscreen-body'; this.onResize = () => { this.resizeTo({ h: this.$window.height() - this.$toolbar.outerHeight(), }); }; } resizeTo(size) { this.$editable.css('height', size.h); this.$codable.css('height', size.h); if (this.$codable.data('cmeditor')) { this.$codable.data('cmeditor').setsize(null, size.h); } } /** * toggle fullscreen */ toggle() { this.$editor.toggleClass('fullscreen'); const isFullscreen = this.isFullscreen(); this.$scrollbar.toggleClass(this.scrollbarClassName, isFullscreen); if (isFullscreen) { this.$editable.data('orgHeight', this.$editable.css('height')); this.$editable.data('orgMaxHeight', this.$editable.css('maxHeight')); this.$editable.css('maxHeight', ''); this.$window.on('resize', this.onResize).trigger('resize'); } else { this.$window.off('resize', this.onResize); this.resizeTo({ h: this.$editable.data('orgHeight') }); this.$editable.css('maxHeight', this.$editable.css('orgMaxHeight')); } this.context.invoke('toolbar.updateFullscreen', isFullscreen); } isFullscreen() { return this.$editor.hasClass('fullscreen'); } destroy() { this.$scrollbar.removeClass(this.scrollbarClassName); } }