cstefanache / angular2-img-cropper

Angular 2 Image Cropper
MIT License
364 stars 135 forks source link

Repo Cleanup #47

Closed rayzru closed 8 years ago

rayzru commented 8 years ago

It's not necessary to keep compiled files. Added .gitignore options for map and compiled files Added postinstall action in package.json

rayzru commented 8 years ago

Sorry, but i think i have added my previous PR changes into this one.

cstefanache commented 8 years ago

Conflict should be ignore - accept your version with Fraction object (I just released a new Number) version as a hotfix

rayzru commented 8 years ago

Phew! So much commits. Finally, I got a stable state of your cool component converted to pure TS with types interfaces and stuff.

My current project is restricted with TSLint rules, so I have to do this. Sorry. ^_^

cstefanache commented 8 years ago

No problem ... getting into code review ... adapting everything and releasing a 6.2 with your changes. Special thanks

cstefanache commented 8 years ago

Planning to merge it today.

rayzru commented 8 years ago

Sorry, I have to ask you. I didn't realise yet, how to upload cropped image with angular2? I saw suggestions related to ng2-file-upload by @valor-software but... u know, that too complicated for me to merge two components into single one. I used that before I have to upload images with fixed aspect ratio.

Thank you for your component we got cropped image data, but what should i do next? I understand that we got encoded base64 data as a result, So I guess, we can just pass that data with multipart headers as regular POST data, but i think this will not behave as a regular upload form action... So, I am asking you, can you help me with this?

Thank you in advance. And sorry for my poor english.

cstefanache commented 8 years ago

Usually this is intended to work with REST APIs with Methods that support BODY data such as POST,PUT etc. Since you are not submitting a form as multipart it can be used to send an entire JSON with information to the server - one of the attr can be base64 image data

rayzru commented 8 years ago

Sure, i have REST API accepting multipart-form-data. So is it possible to send cropped data as regular multipart POST?

cstefanache commented 8 years ago

Getting: (need to investigate why) image

rayzru commented 8 years ago

Try add export here: declare var Fraction: { => export declare var Fraction: {

Did you build typings before running new code? Try $ typings install as well

Also can you please explain how to reproduce this error?

cstefanache commented 8 years ago

Was there a good reason to change the runtime test app? The examples there show how to use both squared and rounded cropper

cstefanache commented 8 years ago

Merged and Released 0.6.4 I reintroduced Both croppers on test app, reintroduced ng2-styler (one of my lib which I am fond of) and changed Fraction definition to simpler version.

Thanks!

cstefanache commented 8 years ago

Can you please give a test-run

rayzru commented 8 years ago

Was there a good reason to change the runtime test app? The examples there show how to use both squared and rounded cropper

No, just for a huge amount of tests and debug code i have to shrink it this way.

rayzru commented 8 years ago

Ok, I try to do test-run this evening.