NaturalIntelligence / imglab

To speedup and simplify image labeling/ annotation process with multiple supported formats.
https://solothought.com/imglab/
MIT License
985 stars 609 forks source link

Add key mapping for quick action (basic js, svg.js ) related to moving shape #34

Closed amitguptagwl closed 6 years ago

amitguptagwl commented 6 years ago

Demo: https://naturalintelligence.github.io/imglab/

workarea.tag.html

Hint code:

if(up) diffY = -1
if(down) diffY = 1
if(left) diffX = -1
if(right) diffX = 1

selectedShapes.forEach(shape => { 
   shape.move(shape.rbox.x + diffX ,shape.rbox.y + diffY) ;
}

Note - all the new key mappings need to be mentioned in shortcuts.tag.html

Check technical documentation.

devamaz commented 6 years ago

Will love to work on this

amitguptagwl commented 6 years ago

Please go on. I hope, it'll not take much time.

devamaz commented 6 years ago

Sorry man didn't check my feeds will work on it today

devamaz commented 6 years ago

Hy need some help with the selectedShapes they are the selectedElement right? @amitguptagwl

amitguptagwl commented 6 years ago

if you mean by variable name it should be selectedElements

devamaz commented 6 years ago

ok Thanks

devamaz commented 6 years ago

Sorry can't continue with this if another person can take

amitguptagwl commented 6 years ago

no problem

amitguptagwl commented 6 years ago

Snippet for reference

selectedElements.forEach(el => {
    el.parent().dy(-1);
});