painterro icon indicating copy to clipboard operation
painterro copied to clipboard

image Icons and arrows

Open Krusty79 opened this issue 3 years ago • 4 comments

Describe the feature It will great to have an ability to add an image Icons for technical drawings and have arrows option for side dimensions

Possible analogs? Gimp, MSPaint, Inkscape, etc...

Krusty79 avatar May 14 '21 20:05 Krusty79

Hi @Krusty79 unfortunately it is not clear at all what do you mean. Please record some videos or post clear screenshots of one of the analogs. Image icon, what is it? For Me sounds like an plain image. So it is already possible. If you mean some kind of left and top roller?

ivictbor avatar May 15 '21 18:05 ivictbor

Hello Ivan, Sorry for the incomprehensible problem. Image Icon - I mean it's better to be able to add the images the client wants to use without routing the download. How I did it in a web drawing app (see attached screenshot and video)

There is also a much bigger problem. If you try to edit an image after saving, all previous updates are overwritten on save.

https://user-images.githubusercontent.com/21046382/118472743-de7d1b00-b711-11eb-9b8f-0d5f6e599477.mp4

webpaint

Regards!

Krusty79 avatar May 17 '21 10:05 Krusty79

@Krusty79 Oh, I see now, thanks a lot, I thought about something another. Now it is clear.

About bigger problem, could you post a code?

ivictbor avatar May 17 '21 11:05 ivictbor

@Krusty79 Oh, I see now, thanks a lot, I thought about something another. Now it is clear.

About bigger problem, could you post a code? compomemt.html `<div *ngIf='quote'> <img (click)="draw()" src="{{ imgUrl }}" />

` component.ts
draw(): void {
    const quoteId=this.quoteId
    const quoteService = this.quoteService
    let painterro = Painterro({
      backplateImgUrl: this.imgUrl,
      defaultArrowLength: 5,
      availableArrowLengths: [1,2,4,8,16,64],
      saveHandler: function (image, done) {
        quoteService.saveHandler(quoteId, image, done).pipe(
          tap(res => {
            if(res['status'] == 'saved'){
              done(true); 
            }
          }),
        ).subscribe()
      }
    });
    painterro.show()
  }

Krusty79 avatar May 17 '21 20:05 Krusty79