public void Render() { var left = coordinate.Left - textarea.ScrollLeft(); var top = coordinate.Top - textarea.ScrollTop(); if (0 <= left && left <= textarea.Width() && 0 <= top && top <= textarea.Height()) { element .Show() .Css("left", coordinate.Left - textarea.ScrollLeft()) .Css("top", coordinate.Top - textarea.ScrollTop()) .Css("height", coordinate.Height); } else { element.Hide(); } }