mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
0d7a00c62f
The "dragging" variable is now handled in Input.js
68 lines
1.0 KiB
JavaScript
68 lines
1.0 KiB
JavaScript
new Tool('eraser', {
|
|
cursor: 'none',
|
|
brushPreview: true,
|
|
});
|
|
new Tool('resizeeraser', {
|
|
cursor: 'default',
|
|
});
|
|
|
|
new Tool('eyedropper', {
|
|
imageCursor: 'eyedropper',
|
|
});
|
|
|
|
new Tool('fill', {
|
|
imageCursor: 'fill',
|
|
});
|
|
|
|
new Tool('line', {
|
|
cursor: 'none',
|
|
brushPreview: true,
|
|
});
|
|
new Tool('resizeline', {
|
|
cursor: 'default',
|
|
});
|
|
|
|
new Tool('pan', {
|
|
cursor: function () {
|
|
if (Input.isDragging()) return 'url(\'/pixel-editor/pan-held.png\'), auto';
|
|
else return 'url(\'/pixel-editor/pan.png\'), auto';
|
|
},
|
|
});
|
|
|
|
new Tool('pencil', {
|
|
cursor: 'none',
|
|
brushPreview: true,
|
|
});
|
|
new Tool('resizebrush', {
|
|
cursor: 'default',
|
|
});
|
|
|
|
new Tool('rectangle', {
|
|
cursor: 'none',
|
|
brushPreview: true,
|
|
});
|
|
new Tool('ellipse', {
|
|
cursor: 'none',
|
|
brushPreview: true,
|
|
});
|
|
new Tool('resizerectangle', {
|
|
cursor: 'default',
|
|
});
|
|
|
|
new Tool('rectselect', {
|
|
cursor: 'crosshair',
|
|
brushPreview: true,
|
|
});
|
|
|
|
|
|
new Tool('moveselection', {
|
|
cursor: 'crosshair',
|
|
});
|
|
|
|
new Tool('zoom', {
|
|
imageCursor: 'zoom-in',
|
|
});
|
|
|
|
//set a default tool
|
|
var currentTool = tool.pencil;
|
|
var currentToolTemp = tool.pencil; |