Skip to content

Commit

Permalink
refactor(): various adjustements
Browse files Browse the repository at this point in the history
- added revokeBlobUrl back from io repo
  • Loading branch information
kaosat-dev committed Apr 26, 2017
1 parent 96c2f05 commit fd1762c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/foo.js

This file was deleted.

6 changes: 6 additions & 0 deletions src/io/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ export function FileSystemApiErrorHandler (fileError, operation) {
const errtxt = 'FileSystem API error: ' + operation + ' returned error ' + errname
throw new Error(errtxt)
}

export function revokeBlobUrl (url) {
if (window.URL) window.URL.revokeObjectURL(url)
else if (window.webkitURL) window.webkitURL.revokeObjectURL(url)
else throw new Error("Your browser doesn't support window.URL")
}
10 changes: 5 additions & 5 deletions src/jscad/processor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { revokeBlobUrl } from '@jscad/io'
import { CAG, CSG } from '@jscad/csg'

import log from './log'
Expand All @@ -8,10 +7,11 @@ import { rebuildSolid, rebuildSolidInWorker } from '../core/rebuildSolid'
import convertToSolid from '../core/convertToSolid'

// output handling
import {generateOutputFile} from '../io/generateOutputFile'
import {prepareOutput} from '../io/prepareOutput'
import {convertToBlob} from '../io/convertToBlob'
import {formats, supportedFormatsForObjects} from '../io/formats'
import { generateOutputFile } from '../io/generateOutputFile'
import { prepareOutput } from '../io/prepareOutput'
import { convertToBlob } from '../io/convertToBlob'
import { formats, supportedFormatsForObjects } from '../io/formats'
import { revokeBlobUrl } from '../io/utils'

import Viewer from '../ui/viewer/jscad-viewer'

Expand Down

0 comments on commit fd1762c

Please sign in to comment.