Fix #24

Signed-off-by: Nina Chen <Nina.Chen@turn.com>
When window resize happens, we should recompute the offset value.