TextPage.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. <template>
  2. <div ref="main" class="main" @click.capture="onMouseClick">
  3. <div v-show="activeCanvas" class="layout">
  4. <div v-html="page1"></div>
  5. </div>
  6. <div v-show="!activeCanvas" class="layout">
  7. <div v-html="page2"></div>
  8. </div>
  9. <div v-show="showStatusBar" ref="statusBar" class="layout">
  10. <div v-html="statusBar"></div>
  11. </div>
  12. <!--canvas :style="canvasStyle2" ref="canvas2" class="canvas" @mousedown.prevent.stop="onMouseDown" @mouseup.prevent.stop="onMouseUp"
  13. @wheel.prevent.stop="onMouseWheel"
  14. @touchstart.stop="onTouchStart" @touchend.stop="onTouchEnd" @touchcancel.prevent.stop="onTouchCancel"
  15. oncontextmenu="return false;">
  16. </canvas-->
  17. <div ref="layoutEvents" class="layout events" @mousedown.prevent.stop="onMouseDown" @mouseup.prevent.stop="onMouseUp"
  18. @wheel.prevent.stop="onMouseWheel"
  19. @touchstart.stop="onTouchStart" @touchend.stop="onTouchEnd" @touchcancel.prevent.stop="onTouchCancel"
  20. oncontextmenu="return false;">
  21. </div>
  22. <canvas ref="offscreenCanvas" style="display: none"></canvas>
  23. </div>
  24. </template>
  25. <script>
  26. //-----------------------------------------------------------------------------
  27. import Vue from 'vue';
  28. import Component from 'vue-class-component';
  29. import _ from 'lodash';
  30. import {sleep} from '../../../share/utils';
  31. import bookManager from '../share/bookManager';
  32. import DrawHelper from './DrawHelper';
  33. export default @Component({
  34. watch: {
  35. bookPos: function(newValue) {
  36. this.debouncedEmitPosChange(newValue);
  37. this.draw();
  38. },
  39. },
  40. })
  41. class TextPage extends Vue {
  42. activeCanvas = false;
  43. showStatusBar = false;
  44. page1 = null;
  45. page2 = null;
  46. statusBar = null;
  47. lastBook = null;
  48. bookPos = 0;
  49. fontStyle = null;
  50. fontSize = null;
  51. fontName = null;
  52. meta = null;
  53. created() {
  54. this.drawHelper = new DrawHelper();
  55. this.commit = this.$store.commit;
  56. this.dispatch = this.$store.dispatch;
  57. this.config = this.$store.state.config;
  58. this.reader = this.$store.state.reader;
  59. this.debouncedEmitPosChange = _.debounce((newValue) => {
  60. this.$emit('book-pos-changed', {bookPos: newValue});
  61. }, 1000);
  62. this.debouncedStartClickRepeat = _.debounce((x, y) => {
  63. this.startClickRepeat(x, y);
  64. }, 800);
  65. this.debouncedPrepareNextPage = _.debounce(() => {
  66. this.prepareNextPage();
  67. }, 100);
  68. this.debouncedDrawStatusBar = _.throttle(() => {
  69. this.drawStatusBar();
  70. }, 60);
  71. this.$root.$on('resize', () => {this.$nextTick(this.onResize)});
  72. this.mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);
  73. }
  74. mounted() {
  75. this.context = this.$refs.offscreenCanvas.getContext('2d');
  76. }
  77. hex2rgba(hex, alpha = 1) {
  78. const [r, g, b] = hex.match(/\w\w/g).map(x => parseInt(x, 16));
  79. return `rgba(${r},${g},${b},${alpha})`;
  80. }
  81. async calcDrawProps() {
  82. this.realWidth = this.$refs.main.clientWidth;
  83. this.realHeight = this.$refs.main.clientHeight;
  84. this.$refs.layoutEvents.style.width = this.realWidth + 'px';
  85. this.$refs.layoutEvents.style.height = this.realHeight + 'px';
  86. this.activeCanvas = false;
  87. this.w = this.realWidth - 2*this.indent;
  88. this.h = this.realHeight - (this.showStatusBar ? this.statusBarHeight : 0);
  89. this.lineHeight = this.fontSize + this.lineInterval;
  90. this.pageLineCount = Math.floor(this.h/this.lineHeight);
  91. if (this.parsed) {
  92. this.parsed.p = this.p;
  93. this.parsed.w = this.w;// px, ширина текста
  94. this.parsed.font = this.font;
  95. this.parsed.wordWrap = this.wordWrap;
  96. this.parsed.measureText = this.measureText;
  97. }
  98. this.statusBarColor = this.hex2rgba(this.textColor, this.statusBarColorAlpha);
  99. this.currentTransition = '';
  100. this.pageChangeDirectionDown = true;
  101. this.fontShift = (this.fontShifts[this.fontName] ? this.fontShifts[this.fontName] : 0)/100;
  102. //drawHelper
  103. this.drawHelper.realWidth = this.realWidth;
  104. this.drawHelper.realHeight = this.realHeight;
  105. this.drawHelper.backgroundColor = this.backgroundColor;
  106. this.drawHelper.statusBarColor = this.statusBarColor;
  107. this.drawHelper.fontName = this.fontName;
  108. this.drawHelper.fontShift = this.fontShift;
  109. this.drawHelper.measureText = this.measureText;
  110. this.drawHelper.measureTextFont = this.measureTextFont;
  111. this.$refs.statusBar.style.left = '0px';
  112. this.$refs.statusBar.style.top = (this.statusBarTop ? 1 : this.realHeight - this.statusBarHeight) + 'px';
  113. }
  114. measureText(text, style) {// eslint-disable-line no-unused-vars
  115. this.context.font = this.fontByStyle(style);
  116. return this.context.measureText(text).width;
  117. }
  118. measureTextFont(text, font) {// eslint-disable-line no-unused-vars
  119. this.context.font = font;
  120. return this.context.measureText(text).width;
  121. }
  122. async loadFonts() {
  123. let loaded = await Promise.all(this.fontList.map(font => document.fonts.check(font)));
  124. if (loaded.some(r => !r)) {
  125. loaded = await Promise.all(this.fontList.map(font => document.fonts.load(font)));
  126. if (loaded.some(r => !r.length))
  127. throw new Error('some font not loaded');
  128. }
  129. }
  130. showBook() {
  131. this.$refs.main.focus();
  132. this.book = null;
  133. this.meta = null;
  134. this.fb2 = null;
  135. this.parsed = null;
  136. this.linesUp = null;
  137. this.linesDown = null;
  138. //preloaded fonts
  139. this.fontShifts = {//%
  140. ReaderDefault: 0,
  141. Arial: 5,
  142. ComicSansMS: -10,
  143. OpenSans: 0,
  144. Roboto: 0,
  145. ArialNarrow: 0,
  146. Georgia: 0,
  147. Tahoma: 0,
  148. Helvetica: 0,
  149. CenturySchoolbook: 0,
  150. }
  151. this.fontList = [];
  152. for (let fontName in this.fontShifts)
  153. this.fontList.push(`12px ${fontName}`);
  154. //default draw props
  155. this.textColor = '#000000';
  156. this.backgroundColor = '#478355';
  157. this.fontStyle = '';// 'bold','italic'
  158. this.fontSize = 35;// px
  159. this.fontName = 'ComicSansMS';
  160. this.lineInterval = 7;// px, межстрочный интервал
  161. this.textAlignJustify = true;// выравнивание по ширине
  162. this.p = 50;// px, отступ параграфа
  163. this.indent = 15;// px, отступ всего текста слева и справа
  164. this.wordWrap = true;
  165. this.keepLastToFirst = true;// перенос последней строки в первую при листании
  166. this.showStatusBar = true;
  167. this.statusBarTop = false;// top, bottom
  168. this.statusBarHeight = 20;// px
  169. this.statusBarColorAlpha = 0.4;
  170. this.pageChangeTransition = '';// '' - нет, downShift, rightShift, thaw - протаивание, blink - мерцание
  171. this.pageChangeTransitionSpeed = 50; //0-100%
  172. this.calcDrawProps();
  173. this.draw(true);// пока не загрузили, очистим канвас
  174. if (this.lastBook) {
  175. (async() => {
  176. const isParsed = await bookManager.hasBookParsed(this.lastBook);
  177. if (!isParsed) {
  178. return;
  179. }
  180. this.book = await bookManager.getBook(this.lastBook);
  181. this.meta = bookManager.metaOnly(this.book);
  182. this.fb2 = this.meta.fb2;
  183. const authorName = _.compact([
  184. this.fb2.lastName,
  185. this.fb2.firstName,
  186. this.fb2.middleName
  187. ]).join(' ');
  188. this.title = _.compact([
  189. authorName,
  190. this.fb2.bookTitle
  191. ]).join(' - ');
  192. this.$root.$emit('set-app-title', this.title);
  193. const parsed = this.book.parsed;
  194. this.parsed = parsed;
  195. this.calcDrawProps();
  196. await this.loadFonts();
  197. this.draw();
  198. this.refreshTime();
  199. })();
  200. }
  201. }
  202. onResize() {
  203. this.calcDrawProps();
  204. this.draw(true);
  205. }
  206. get font() {
  207. return `${this.fontStyle} ${this.fontSize}px ${this.fontName}`;
  208. }
  209. fontByStyle(style) {
  210. return `${style.italic ? 'italic' : ''} ${style.bold ? 'bold' : ''} ${this.fontSize}px ${this.fontName}`;
  211. }
  212. draw(immediate) {
  213. if (this.book && this.bookPos > 0 && this.bookPos >= this.parsed.textLength) {
  214. this.doEnd();
  215. return;
  216. }
  217. this.activeCanvas = !this.activeCanvas;
  218. if (immediate) {
  219. if (this.activeCanvas)
  220. this.page1 = this.drawPage(this.bookPos);
  221. else
  222. this.page2 = this.drawPage(this.bookPos);
  223. } else {
  224. if (this.pageChangeDirectionDown && this.pagePrepared && this.bookPos == this.bookPosPrepared) {
  225. this.linesDown = this.linesDownNext;
  226. this.linesUp = this.linesUpNext;
  227. this.pagePrepared = false;
  228. this.debouncedPrepareNextPage();
  229. } else {
  230. if (this.activeCanvas)
  231. this.page1 = this.drawPage(this.bookPos);
  232. else
  233. this.page2 = this.drawPage(this.bookPos);
  234. this.pagePrepared = false;
  235. this.debouncedPrepareNextPage();
  236. }
  237. if (this.currentTransition) {
  238. //this.currentTransition
  239. //this.pageChangeTransitionSpeed
  240. //this.pageChangeDirectionDown
  241. //curr to next transition
  242. //пока заглушка
  243. }
  244. this.currentTransition = '';
  245. this.pageChangeDirectionDown = false;//true только если PgDown
  246. }
  247. this.debouncedDrawStatusBar();
  248. }
  249. drawPage(bookPos, nextChangeLines) {
  250. if (!this.lastBook)
  251. return;
  252. let out = `<div class="layout" style="width: ${this.realWidth}px; height: ${this.realHeight}px;` +
  253. ` color: ${this.textColor}; background-color: ${this.backgroundColor}">`;
  254. if (!this.book || !this.parsed.textLength) {
  255. out += '</div>';
  256. return out;
  257. }
  258. const spaceWidth = this.measureText(' ', {});
  259. const lines = this.parsed.getLines(bookPos, 2*this.pageLineCount);
  260. if (!nextChangeLines) {
  261. this.linesDown = lines;
  262. this.linesUp = this.parsed.getLines(bookPos, -2*this.pageLineCount);
  263. } else {
  264. this.linesDownNext = lines;
  265. this.linesUpNext = this.parsed.getLines(bookPos, -2*this.pageLineCount);
  266. }
  267. let y = -this.lineInterval/2 + (this.h - this.pageLineCount*this.lineHeight)/2 + this.fontSize*this.fontShift;
  268. if (this.showStatusBar)
  269. y += this.statusBarHeight*(this.statusBarTop ? 1 : 0);
  270. let len = lines.length;
  271. len = (len > this.pageLineCount ? len = this.pageLineCount : len);
  272. for (let i = 0; i < len; i++) {
  273. const line = lines[i];
  274. /* line:
  275. {
  276. begin: Number,
  277. end: Number,
  278. first: Boolean,
  279. last: Boolean,
  280. parts: array of {
  281. style: {bold: Boolean, italic: Boolean, center: Boolean}
  282. text: String,
  283. }
  284. }*/
  285. let indent = this.indent + (line.first ? this.p : 0);
  286. let lineText = '';
  287. let center = false;
  288. let centerStyle = {};
  289. for (const part of line.parts) {
  290. lineText += part.text;
  291. center = center || part.style.center;
  292. if (part.style.center)
  293. centerStyle = part.style.center;
  294. }
  295. let filled = false;
  296. // если выравнивание по ширине включено
  297. if (this.textAlignJustify && !line.last && !center) {
  298. const words = lineText.split(' ');
  299. if (words.length > 1) {
  300. const spaceCount = words.length - 1;
  301. const space = (this.w - line.width + spaceWidth*spaceCount)/spaceCount;
  302. let x = indent;
  303. for (const part of line.parts) {
  304. const font = this.fontByStyle(part.style);
  305. let partWords = part.text.split(' ');
  306. for (let i = 0; i < partWords.length; i++) {
  307. let word = partWords[i];
  308. out += this.drawHelper.fillText(word, x, y, font);
  309. x += this.measureText(word, part.style) + (i < partWords.length - 1 ? space : 0);
  310. }
  311. }
  312. filled = true;
  313. }
  314. }
  315. // просто выводим текст
  316. if (!filled) {
  317. let x = indent;
  318. x = (center ? this.indent + (this.w - this.measureText(lineText, centerStyle))/2 : x);
  319. for (const part of line.parts) {
  320. let text = part.text;
  321. const font = this.fontByStyle(part.style);
  322. out += this.drawHelper.fillText(text, x, y, font);
  323. x += this.measureText(text, part.style);
  324. }
  325. }
  326. y += this.lineHeight;
  327. }
  328. out += '</div>';
  329. return out;
  330. }
  331. drawStatusBar() {
  332. if (this.showStatusBar && this.linesDown) {
  333. const lines = this.linesDown;
  334. let i = this.pageLineCount;
  335. if (this.keepLastToFirst)
  336. i--;
  337. i = (i > lines.length - 1 ? lines.length - 1 : i);
  338. this.statusBar = this.drawHelper.drawStatusBar(this.statusBarTop, this.statusBarHeight,
  339. lines[i].end, this.parsed.textLength, this.title);
  340. }
  341. }
  342. async refreshTime() {
  343. if (!this.timeRefreshing) {
  344. this.timeRefreshing = true;
  345. await sleep(60*1000);
  346. if (this.book && this.parsed.textLength) {
  347. this.debouncedDrawStatusBar();
  348. }
  349. this.timeRefreshing = false;
  350. this.refreshTime();
  351. }
  352. }
  353. prepareNextPage() {
  354. // подготовка следующей страницы заранее
  355. if (!this.book || !this.parsed.textLength)
  356. return;
  357. if (!this.preparing) {
  358. this.preparing = true;
  359. (async() => {
  360. await sleep(100);
  361. if (this.cancelPrepare) {
  362. this.preparing = false;
  363. return;
  364. }
  365. let i = this.pageLineCount;
  366. if (this.keepLastToFirst)
  367. i--;
  368. if (i >= 0 && this.linesDown.length > i) {
  369. this.bookPosPrepared = this.linesDown[i].begin;
  370. if (this.activeCanvas)
  371. this.page2 = this.drawPage(this.bookPosPrepared, true);//наоборот
  372. else
  373. this.page1 = this.drawPage(this.bookPosPrepared, true);
  374. this.pagePrepared = true;
  375. }
  376. this.preparing = false;
  377. })();
  378. }
  379. }
  380. doDown() {
  381. if (this.linesDown && this.linesDown.length > this.pageLineCount) {
  382. this.bookPos = this.linesDown[1].begin;
  383. }
  384. }
  385. doUp() {
  386. if (this.linesUp && this.linesUp.length > 1) {
  387. this.bookPos = this.linesUp[1].begin;
  388. }
  389. }
  390. doPageDown() {
  391. if (this.linesDown) {
  392. let i = this.pageLineCount;
  393. if (this.keepLastToFirst)
  394. i--;
  395. if (i >= 0 && this.linesDown.length >= 2*i) {
  396. this.currentTransition = this.pageChangeTransition;
  397. this.pageChangeDirectionDown = true;
  398. this.bookPos = this.linesDown[i].begin;
  399. } else
  400. this.doEnd();
  401. }
  402. }
  403. doPageUp() {
  404. if (this.linesUp) {
  405. let i = this.pageLineCount;
  406. if (this.keepLastToFirst)
  407. i--;
  408. i = (i > this.linesUp.length - 1 ? this.linesUp.length - 1 : i);
  409. if (i >= 0 && this.linesUp.length > i) {
  410. this.currentTransition = this.pageChangeTransition;
  411. this.pageChangeDirectionDown = false;
  412. this.bookPos = this.linesUp[i].begin;
  413. }
  414. }
  415. }
  416. doHome() {
  417. this.bookPos = 0;
  418. }
  419. doEnd() {
  420. if (this.parsed.para.length) {
  421. let i = this.parsed.para.length - 1;
  422. let lastPos = this.parsed.para[i].offset + this.parsed.para[i].length - 1;
  423. const lines = this.parsed.getLines(lastPos, -this.pageLineCount);
  424. i = this.pageLineCount - 1;
  425. i = (i > lines.length - 1 ? lines.length - 1 : i);
  426. this.bookPos = lines[i].begin;
  427. }
  428. }
  429. doToolBarToggle() {
  430. this.$emit('tool-bar-toggle');
  431. }
  432. keyHook(event) {
  433. if (event.type == 'keydown') {
  434. switch (event.code) {
  435. case 'ArrowDown':
  436. this.doDown();
  437. break;
  438. case 'ArrowUp':
  439. this.doUp();
  440. break;
  441. case 'PageDown':
  442. case 'ArrowRight':
  443. case 'Enter':
  444. case 'Space':
  445. this.doPageDown();
  446. break;
  447. case 'PageUp':
  448. case 'ArrowLeft':
  449. case 'Backspace':
  450. this.doPageUp();
  451. break;
  452. case 'Home':
  453. this.doHome();
  454. break;
  455. case 'End':
  456. this.doEnd();
  457. break;
  458. }
  459. }
  460. }
  461. async startClickRepeat(pointX, pointY) {
  462. this.repX = pointX;
  463. this.repY = pointY;
  464. if (!this.repInit && this.repDoing) {
  465. this.repInit = true;
  466. let delay = 400;
  467. while (this.repDoing) {
  468. this.handleClick(pointX, pointY);
  469. await sleep(delay);
  470. if (delay > 15)
  471. delay *= 0.8;
  472. }
  473. this.repInit = false;
  474. }
  475. }
  476. endClickRepeat() {
  477. this.repDoing = false;
  478. }
  479. onTouchStart(event) {
  480. if (!this.mobile)
  481. return;
  482. this.endClickRepeat();
  483. if (event.touches.length == 1) {
  484. const touch = event.touches[0];
  485. const rect = event.target.getBoundingClientRect();
  486. const x = touch.pageX - rect.left;
  487. const y = touch.pageY - rect.top;
  488. if (this.handleClick(x, y)) {
  489. this.repDoing = true;
  490. this.debouncedStartClickRepeat(x, y);
  491. }
  492. }
  493. }
  494. onTouchEnd() {
  495. if (!this.mobile)
  496. return;
  497. this.endClickRepeat();
  498. }
  499. onTouchCancel() {
  500. if (!this.mobile)
  501. return;
  502. this.endClickRepeat();
  503. }
  504. onMouseDown(event) {
  505. if (this.mobile)
  506. return;
  507. this.endClickRepeat();
  508. if (event.button == 0) {
  509. if (this.handleClick(event.offsetX, event.offsetY)) {
  510. this.repDoing = true;
  511. this.debouncedStartClickRepeat(event.offsetX, event.offsetY);
  512. }
  513. } else if (event.button == 2) {
  514. this.doToolBarToggle();
  515. }
  516. }
  517. onMouseUp() {
  518. if (this.mobile)
  519. return;
  520. this.endClickRepeat();
  521. }
  522. onMouseWheel(event) {
  523. if (this.mobile)
  524. return;
  525. if (event.deltaY > 0) {
  526. this.doDown();
  527. } else if (event.deltaY < 0) {
  528. this.doUp();
  529. }
  530. }
  531. checkPointInStatusBar(pointX, pointY) {
  532. let titleBar = {x1: 0, y1: 0, x2: this.realWidth/2, y2: this.statusBarHeight + 1};
  533. if (!this.statusBarTop) {
  534. titleBar.y1 += this.realHeight - this.statusBarHeight + 1;
  535. titleBar.y2 += this.realHeight - this.statusBarHeight + 1;
  536. }
  537. if (pointX >= titleBar.x1 && pointX <= titleBar.x2 &&
  538. pointY >= titleBar.y1 && pointY <= titleBar.y2) {
  539. return true;
  540. }
  541. return false;
  542. }
  543. onMouseClick(event) {
  544. if (this.showStatusBar && this.book) {
  545. if (this.checkPointInStatusBar(event.offsetX, event.offsetY)) {
  546. window.open(this.meta.url, '_blank');
  547. return false;
  548. }
  549. }
  550. }
  551. handleClick(pointX, pointY) {
  552. const mouseLegend = {
  553. 40: {30: 'PgUp', 100: 'PgDown'},
  554. 60: {40: 'Up', 60: 'Menu', 100: 'Down'},
  555. 100: {30: 'PgUp', 100: 'PgDown'}
  556. };
  557. if (this.showStatusBar && this.book) {
  558. if (this.checkPointInStatusBar(pointX, pointY)) {
  559. return false;
  560. }
  561. }
  562. const w = pointX/this.realWidth*100;
  563. const h = pointY/this.realHeight*100;
  564. let action = '';
  565. loops: {
  566. for (const x in mouseLegend) {
  567. for (const y in mouseLegend[x]) {
  568. if (w < x && h < y) {
  569. action = mouseLegend[x][y];
  570. break loops;
  571. }
  572. }
  573. }
  574. }
  575. switch (action) {
  576. case 'Down' ://Down
  577. this.doDown();
  578. break;
  579. case 'Up' ://Up
  580. this.doUp();
  581. break;
  582. case 'PgDown' ://PgDown
  583. this.doPageDown();
  584. break;
  585. case 'PgUp' ://PgUp
  586. this.doPageUp();
  587. break;
  588. case 'Menu' :
  589. this.doToolBarToggle();
  590. break;
  591. default :
  592. // Nothing
  593. }
  594. return (action && action != 'Menu');
  595. }
  596. }
  597. //-----------------------------------------------------------------------------
  598. </script>
  599. <style scoped>
  600. .main {
  601. flex: 1;
  602. margin: 0;
  603. padding: 0;
  604. overflow: hidden;
  605. position: relative;
  606. }
  607. .layout {
  608. margin: 0;
  609. padding: 0;
  610. position: absolute;
  611. z-index: 10;
  612. }
  613. .events {
  614. z-index: 20;
  615. background-color: rgba(0,0,0,0);
  616. }
  617. </style>