@Test public void testScrollToDom() throws Exception { createBody(); JSONObject obj; obj = new JSONObject(); obj.put("type","div"); obj.put("ref","100"); stmt.addDom(obj,WXDomObject.ROOT,0); stmt.scrollToDom("100",null); stmt.batch(); }
void scrollToDom(final String ref, final JSONObject options) { if (mDestroy) { return; } WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId); mNormalTasks.add(new IWXRenderTask() { @Override public void execute() { mWXRenderManager.scrollToComponent(mInstanceId, ref, options); } @Override public String toString() { return "scrollToPosition"; } }); mDirty = true; if (instance != null) { instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS); } }
WXDomStatement { void scrollToDom(final String ref, final JSONObject options) { if (mDestroy) { return; } WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId); mNormalTasks.add(new IWXRenderTask() { @Override public void execute() { mWXRenderManager.scrollToComponent(mInstanceId, ref, options); } @Override public String toString() { return "scrollToPosition"; } }); mDirty = true; if (instance != null) { instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS); } } }
WXDomStatement { void scrollToDom(final String ref, final JSONObject options) { if (mDestroy) { return; } WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId); mNormalTasks.add(new IWXRenderTask() { @Override public void execute() { mWXRenderManager.scrollToComponent(mInstanceId, ref, options); } @Override public String toString() { return "scrollToPosition"; } }); mDirty = true; if (instance != null) { instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS); } } WXDomStatement(String instanceId, WXRenderManager renderManager); }
WXDomStatement { void scrollToDom(final String ref, final JSONObject options) { if (mDestroy) { return; } WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId); mNormalTasks.add(new IWXRenderTask() { @Override public void execute() { mWXRenderManager.scrollToComponent(mInstanceId, ref, options); } @Override public String toString() { return "scrollToPosition"; } }); mDirty = true; if (instance != null) { instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS); } } WXDomStatement(String instanceId, WXRenderManager renderManager); void destroy(); void getComponentSize(final String ref, final JSCallback callback); }
WXDomStatement { void scrollToDom(final String ref, final JSONObject options) { if (mDestroy) { return; } WXSDKInstance instance = WXSDKManager.getInstance().getSDKInstance(mInstanceId); mNormalTasks.add(new IWXRenderTask() { @Override public void execute() { mWXRenderManager.scrollToComponent(mInstanceId, ref, options); } @Override public String toString() { return "scrollToPosition"; } }); mDirty = true; if (instance != null) { instance.commitUTStab(IWXUserTrackAdapter.DOM_MODULE, WXErrorCode.WX_SUCCESS); } } WXDomStatement(String instanceId, WXRenderManager renderManager); void destroy(); void getComponentSize(final String ref, final JSCallback callback);  }