name fn to camel case

pull/21833/head
Bruno Windels 2019-04-09 12:18:06 +02:00
parent 15ba24f7fb
commit ea71970299
1 changed files with 3 additions and 4 deletions

View File

@ -26,8 +26,7 @@ import { _t } from './languageHandler';
import Modal from './Modal'; import Modal from './Modal';
import RoomViewStore from './stores/RoomViewStore'; import RoomViewStore from './stores/RoomViewStore';
import encrypt from "browser-encrypt-attachment"; import encrypt from "browser-encrypt-attachment";
// eslint-disable-next-line camelcase import extractPngChunks from "png-chunks-extract";
import png_chunks_extract from "png-chunks-extract";
// Polyfill for Canvas.toBlob API using Canvas.toDataURL // Polyfill for Canvas.toBlob API using Canvas.toDataURL
import "blueimp-canvas-to-blob"; import "blueimp-canvas-to-blob";
@ -117,11 +116,11 @@ function loadImageElement(imageFile) {
// in practice macOS happens to order the chunks so they fall in // in practice macOS happens to order the chunks so they fall in
// the first 0x1000 bytes (thanks to a massive ICC header). // the first 0x1000 bytes (thanks to a massive ICC header).
// Thus we could slice the file down to only sniff the first 0x1000 // Thus we could slice the file down to only sniff the first 0x1000
// bytes (but this makes png_chunks_extract choke on the corrupt file) // bytes (but this makes extractPngChunks choke on the corrupt file)
const headers = imageFile; //.slice(0, 0x1000); const headers = imageFile; //.slice(0, 0x1000);
readFileAsArrayBuffer(headers).then(arrayBuffer=>{ readFileAsArrayBuffer(headers).then(arrayBuffer=>{
const buffer = new Uint8Array(arrayBuffer); const buffer = new Uint8Array(arrayBuffer);
const chunks = png_chunks_extract(buffer); const chunks = extractPngChunks(buffer);
for (const chunk of chunks) { for (const chunk of chunks) {
if (chunk.name === 'pHYs') { if (chunk.name === 'pHYs') {
if (chunk.data.byteLength !== PHYS_HIDPI.length) return; if (chunk.data.byteLength !== PHYS_HIDPI.length) return;