defold_polygon_editor icon indicating copy to clipboard operation
defold_polygon_editor copied to clipboard

Add points issue

Open nikolajevs86 opened this issue 5 years ago • 13 comments

In example shows error while adding new points: ERROR:SCRIPT: /main/editor/editor.script:228: The receiver shouldn't be nil stack traceback: [C]: in function 'post' /main/editor/editor.script:228: in function </main/editor/editor.script:207>

nikolajevs86 avatar Aug 15 '20 11:08 nikolajevs86

Seeing this as well. Looks like this is no longer working.

rduke1982 avatar Apr 09 '21 12:04 rduke1982

Alright, thanks for the report! I'll take a look at it.

rgrams avatar Apr 12 '21 16:04 rgrams

Alright, it was a one-liner fix. Honestly I don't know how this worked ever before.

Sorry for leaving this for so long. I must have completely missed the original issue post. :S

rgrams avatar Apr 13 '21 00:04 rgrams

It's okay. I still however can't get it working. The first several clicks don't register and when the clicks start to work, they're in the wrong locations. I made a video that shows the problem.

https://monosnap.com/file/pSwGYrEyMaulXOSjYwk3OATYuwXgWL

rduke1982 avatar Apr 15 '21 09:04 rduke1982

Hmm, well that's pretty messed up! No errors in the console? What happens if you resize the window? Can you try enabling the "High DPI" setting in the game.project file?

rgrams avatar Apr 15 '21 11:04 rgrams

No errors in the console. I used print to test input and input is being recognized.

Resizing the window almost fixes the issue. After resizing, the points appear correctly after clicking. Prior to resizing the window, the points are offset to the positive x,y positions.

I enabled High DPI and still had this issue.

Technically, it works after resizing the window, clearing the previous points, and starting a new shape.

rduke1982 avatar Apr 15 '21 14:04 rduke1982

OK, thanks, that helps. Yeah, so it has something to do with the screen-to-world transformation. It's annoying that it works fine on my machine but breaks on yours. You're running it on Mac? I'll see if I can find anything. Thanks for testing.

rgrams avatar Apr 15 '21 14:04 rgrams

Yes, on a macbook.

On Thu, Apr 15, 2021 at 5:58 PM rgrams @.***> wrote:

OK, thanks, that helps. Yeah, so it has something to do with the screen-to-world transformation. It's annoying that it works fine on my machine but breaks on yours. You're running it on Mac? I'll see if I can find anything. Thanks for testing.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rgrams/defold_polygon_editor/issues/4#issuecomment-820497606, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBQMCPMHC4ILZS5UOZVQS3TI35LBANCNFSM4QAHM4GQ .

-- Respectfully, Raymond Duke raymondduke.com

rduke1982 avatar Apr 15 '21 15:04 rduke1982

@RaymondDuke Would you mind trying it again now to see if it's fixed?

To be honest I didn't actually diagnose that specific problem, but there was some very questionable bits in the camera/rendering code, which I replaced. The web version is working properly now, so hopefully it works on mac as well.

rgrams avatar Apr 23 '21 16:04 rgrams

@rgrams I haven't had a chance to check this out yet on my mac, but I can confirm the web version works great.

rduke1982 avatar May 02 '21 06:05 rduke1982

To me is not working the web demo for adding points. Everything else seems to work, like drag and drop image, but when clicking "save" complains about I need to add at least 3 points.

defoldino avatar Feb 28 '25 06:02 defoldino

@defoldino How does it not work? You mention two different issues. Are you able to add points by holding down Ctrl and left-clicking?

rgrams avatar Feb 28 '25 12:02 rgrams

@defoldino How does it not work? You mention two different issues. Are you able to add points by holding down Ctrl and left-clicking?

ups, I totally missed the "ctrl-" of "ctrl-click" instructions. it works perfectly.

defoldino avatar Mar 02 '25 08:03 defoldino