Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image Icons and arrows #143

Open
Krusty79 opened this issue May 14, 2021 · 4 comments
Open

image Icons and arrows #143

Krusty79 opened this issue May 14, 2021 · 4 comments

Comments

@Krusty79
Copy link

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...

@ivictbor
Copy link
Collaborator

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?

@Krusty79
Copy link
Author

Krusty79 commented May 17, 2021

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.

painter-2021-05-17_13.09.28.mp4

webpaint

Regards!

@ivictbor
Copy link
Collaborator

@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?

@Krusty79
Copy link
Author

Krusty79 commented May 17, 2021

@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()
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants