static float s_widtheOffset = 32;
static float s_heightOffset = 60;
+static int s_magnifierMargin = 10;
void TextSelectionMagnifier::update(const IntPoint& point)
{
if (overSize > 0)
rect.setY(rect.y() - overSize);
+ // Check if the touch point is very near to top or bottom.
+ // Adjust the rect to get the proper image in magnifier
+ if ((rect.y() < m_height/2) && (rect.y() > s_magnifierMargin))
+ rect.setY(rect.y() - (s_magnifierMargin));
+ if (rect.y() > (viewHeight - m_height))
+ rect.setY(rect.y() + (s_magnifierMargin));
+
RefPtr<WebImage> webImage = m_viewImpl->page()->createSnapshot(rect, zoomLevel);
if (!webImage || !webImage->bitmap())
return;
evas_object_smart_callback_call(m_viewImpl->view(), "magnifier,hide", 0);
}
-static int s_magnifierMargin = 10;
static int s_magnifierOffsetY = 220;
static int s_defaultEdjeHeight = 177;