Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
imagePanel.showCrop();
};
const resizePanelUpdate = (anyInSystem: AlloyComponent): void => {
memSize.getOpt(anyInSystem).each((sizeInput) => {
const measurements = imagePanel.getMeasurements();
const width = measurements.width;
const height = measurements.height;
Representing.setValue(sizeInput, {
width,
height
});
});
};
const sharpenTransform = Option.some(ImageTransformations.sharpen);
const invertTransform = Option.some(ImageTransformations.invert);
const buttonPanelComponents = [
createIconButton('crop', 'Crop', getTransformPanelEvent(CropPanel, Option.none(), cropPanelUpdate), false),
createIconButton('resize', 'Resize', getTransformPanelEvent(ResizePanel, Option.none(), resizePanelUpdate), false),
createIconButton('orientation', 'Orientation', getTransformPanelEvent(FlipRotatePanel, Option.none(), noop), false),
createIconButton('brightness', 'Brightness', getTransformPanelEvent(BrightnessPanel, Option.none(), noop), false),
createIconButton('sharpen', 'Sharpen', getTransformPanelEvent(FilterPanel, sharpenTransform, noop), false),
createIconButton('contrast', 'Contrast', getTransformPanelEvent(ContrastPanel, Option.none(), noop), false),
createIconButton('color-levels', 'Color levels', getTransformPanelEvent(ColorizePanel, Option.none(), noop), false),
createIconButton('gamma', 'Gamma', getTransformPanelEvent(GammaPanel, Option.none(), noop), false),
createIconButton('invert', 'Invert', getTransformPanelEvent(FilterPanel, invertTransform, noop), false),
];
const ButtonPanel = Container.sketch({
dom: panelDom,