From: Paul Wisbey
Date: Thu, 2 Jun 2016 17:02:37 +0000 (-0700)
Subject: Merge "Selection box fix for multi-line." into devel/master
X-Git-Tag: dali_1.1.37~2
X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=e0e3e5354868ab2b8d2633b0e881c00199c9d6fa;hp=406e867751efb13d5035a7ba914bbc665f44ac6a
Merge "Selection box fix for multi-line." into devel/master
---
diff --git a/dali-toolkit/internal/text/text-scroller.cpp b/dali-toolkit/internal/text/text-scroller.cpp
index 1201619..3c9b450 100644
--- a/dali-toolkit/internal/text/text-scroller.cpp
+++ b/dali-toolkit/internal/text/text-scroller.cpp
@@ -197,12 +197,12 @@ TextScrollerPtr TextScroller::New( ScrollerInterface& scrollerInterface )
void TextScroller::SetGap( int gap )
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetGap gap[%d]\n", gap );
- mWrapGap = gap;
+ mWrapGap = static_cast(gap);
}
int TextScroller::GetGap() const
{
- return mWrapGap;
+ return static_cast(mWrapGap);
}
void TextScroller::SetSpeed( int scrollSpeed )
@@ -252,7 +252,7 @@ TextScroller::TextScroller( ScrollerInterface& scrollerInterface ) : mScrollerIn
mScrollDeltaIndex( Property::INVALID_INDEX ),
mScrollSpeed( MINIMUM_SCROLL_SPEED ),
mLoopCount( 1 ),
- mWrapGap( 0 )
+ mWrapGap( 0.0f )
{
DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller Default Constructor\n" );
}
@@ -286,7 +286,7 @@ void TextScroller::SetParameters( Actor sourceActor, const Size& controlSize, co
mOffscreenCameraActor.SetY( offScreenSize.height * 0.5f );
- DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetParameters mWrapGap[%d]\n", mWrapGap )
+ DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextScroller::SetParameters mWrapGap[%f]\n", mWrapGap )
mScrollingTextActor = Actor::New();
mScrollingTextActor.AddRenderer( renderer );
diff --git a/dali-toolkit/internal/text/text-scroller.h b/dali-toolkit/internal/text/text-scroller.h
index ef50b77..17824b6 100644
--- a/dali-toolkit/internal/text/text-scroller.h
+++ b/dali-toolkit/internal/text/text-scroller.h
@@ -161,9 +161,9 @@ private:
Property::Index mScrollDeltaIndex; // Property used by shader to represent distance to scroll
Animation mScrollAnimation; // Animation used to update the mScrollDeltaIndex
- int mScrollSpeed; ///< Speed which text should automatically scroll at
- int mLoopCount; ///< Number of time the text should scroll
- int mWrapGap; ///< Gap before text wraps around when scrolling
+ int mScrollSpeed; ///< Speed which text should automatically scroll at
+ int mLoopCount; ///< Number of time the text should scroll
+ float mWrapGap; ///< Gap before text wraps around when scrolling
}; // TextScroller class
diff --git a/plugins/dali-script-v8/src/object/property-value-wrapper.cpp b/plugins/dali-script-v8/src/object/property-value-wrapper.cpp
index b160642..f1fad65 100644
--- a/plugins/dali-script-v8/src/object/property-value-wrapper.cpp
+++ b/plugins/dali-script-v8/src/object/property-value-wrapper.cpp
@@ -527,9 +527,15 @@ v8::Local CreateJavaScriptPrimitive( v8::Isolate* isolate, const Dal
break;
}
}
- v8::Local ret = v8Value->ToObject();
- return handleScope.Escape( ret );
+ v8::Local ret;
+
+ if( v8Value->IsObject() )
+ {
+ ret = v8Value->ToObject();
+ }
+
+ return handleScope.Escape( ret );
}