updated editor offset code