Skip to content

Commit a87a262

Browse files
committed
readme changes, fix defined property check
1 parent 87716ef commit a87a262

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ With Painterro you can:
1010
- Paint primitives (alpha color can be used)
1111
- Add text
1212
- Rotate / Resize image
13+
- Pixelize some area to hide sensitive data
1314

1415
![Painterro preview](https://raw.githubusercontent.com/ivictbor/painterro/master/docs/preview.png)
1516

@@ -317,7 +318,7 @@ ToDo list
317318
- Edit button on images (provide selector)
318319
- Add recent colors pallete
319320
- Add recent image sizes in resize tool
320-
- Blur region
321321
- Ability to save loacaly
322322
- Save settings in loaclstorage
323323
- line arrows
324+
- Process ESC and ENTER keys in tools

js/colorPicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export default class ColorPicker {
175175
x = (x < 1 && 1) || x;
176176
x = (x > this.w - 1 && this.w - 1) || x;
177177
this.alphaPosition = x;
178-
this.alphaRegulator.style.left = x;
178+
this.alphaRegulator.style.left = `${x}px`;
179179
this.regetAlpha();
180180
}
181181

js/utils.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,30 @@ export function genId() {
88
}
99

1010
export function addDocumentObjectHelpers() {
11-
if (!Object.prototype.hasOwnProperty.call(Element, 'documentOffsetTop')) {
11+
if (!('documentOffsetTop' in Element.prototype)) {
1212
Object.defineProperty(Element.prototype, 'documentOffsetTop', {
1313
get() {
1414
return this.offsetTop + (this.offsetParent ? this.offsetParent.documentOffsetTop : 0);
1515
},
1616
});
1717
}
18-
if (!Object.prototype.hasOwnProperty.call(Element, 'documentOffsetLeft')) {
18+
if (!('documentOffsetLeft' in Element.prototype)) {
1919
Object.defineProperty(Element.prototype, 'documentOffsetLeft', {
2020
get() {
2121
return this.offsetLeft + (this.offsetParent ? this.offsetParent.documentOffsetLeft : 0);
2222
},
2323
});
2424
}
2525

26-
if (!Object.prototype.hasOwnProperty.call(Element, 'documentClientWidth')) {
26+
if (!('documentClientWidth' in Element.prototype)) {
2727
Object.defineProperty(Element.prototype, 'documentClientWidth', {
2828
get() {
2929
return this.getBoundingClientRect().width;
3030
},
3131
});
3232
}
3333

34-
if (!Object.prototype.hasOwnProperty.call(Element, 'documentClientHeight')) {
34+
if (!('documentClientHeight' in Element.prototype)) {
3535
Object.defineProperty(Element.prototype, 'documentClientHeight', {
3636
get() {
3737
return this.getBoundingClientRect().height;

0 commit comments

Comments
 (0)