i.e. it should add the offset to the new point, not subtract it.
If my thinking is correct, I'd expect this g-code to create a 10x5 box with a 8x3 box contained within, but right now it creates a 10x5 box with a 8x3 box offset(starting at X-2Y-1):
G1X0Y0Z0
G1X10Y0
G1X10Y5
G1X0Y5
G1X0Y0
G10 L2 P1 X2Y1
G1X0Y0
G1X8Y0
G1X8Y3
G1X0Y3
G1X0Y0
I think that this might be inverted: https://github.com/nraynaud/webgcode/blob/gh-pages/webapp/cnc/gcode/parser.js#L288
i.e. it should add the offset to the new point, not subtract it.
If my thinking is correct, I'd expect this g-code to create a 10x5 box with a 8x3 box contained within, but right now it creates a 10x5 box with a 8x3 box offset(starting at X-2Y-1): G1X0Y0Z0 G1X10Y0 G1X10Y5 G1X0Y5 G1X0Y0 G10 L2 P1 X2Y1 G1X0Y0 G1X8Y0 G1X8Y3 G1X0Y3 G1X0Y0