Fix edge drawing bug

Fix: edge drawing behaves incorrectly when camera is very close to
origin.