2018-04-05 18:06:37 -04:00
|
|
|
import keyMirror from 'keymirror';
|
|
|
|
|
|
|
|
const Formats = keyMirror({
|
|
|
|
BITMAP: null,
|
2018-04-09 20:10:53 -04:00
|
|
|
VECTOR: null,
|
2018-04-10 18:02:30 -04:00
|
|
|
// Format changes which should not trigger conversions, for instance undo
|
|
|
|
BITMAP_SKIP_CONVERT: null,
|
|
|
|
VECTOR_SKIP_CONVERT: null
|
2018-04-05 18:06:37 -04:00
|
|
|
});
|
|
|
|
|
2018-04-09 20:10:53 -04:00
|
|
|
const isVector = function (format) {
|
2018-04-10 18:02:30 -04:00
|
|
|
return format === Formats.VECTOR || format === Formats.VECTOR_SKIP_CONVERT;
|
2018-04-09 20:10:53 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
const isBitmap = function (format) {
|
2018-04-10 18:02:30 -04:00
|
|
|
return format === Formats.BITMAP || format === Formats.BITMAP_SKIP_CONVERT;
|
2018-04-09 20:10:53 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
export {
|
|
|
|
Formats as default,
|
|
|
|
isVector,
|
|
|
|
isBitmap
|
|
|
|
};
|