mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 21:42:30 -05:00
23 lines
549 B
JavaScript
23 lines
549 B
JavaScript
import keyMirror from 'keymirror';
|
|
|
|
const Formats = keyMirror({
|
|
BITMAP: null,
|
|
VECTOR: null,
|
|
// Format changes which should not trigger conversions, for instance undo
|
|
BITMAP_SKIP_CONVERT: null,
|
|
VECTOR_SKIP_CONVERT: null
|
|
});
|
|
|
|
const isVector = function (format) {
|
|
return format === Formats.VECTOR || format === Formats.VECTOR_SKIP_CONVERT;
|
|
};
|
|
|
|
const isBitmap = function (format) {
|
|
return format === Formats.BITMAP || format === Formats.BITMAP_SKIP_CONVERT;
|
|
};
|
|
|
|
export {
|
|
Formats as default,
|
|
isVector,
|
|
isBitmap
|
|
};
|