use of com.taobao.weex.ui.component.WXComponent in project incubator-weex by apache.
the class RemoveElementAction method executeRender.
@Override
public void executeRender(RenderActionContext context) {
WXComponent component = context.getComponent(mRef);
if (component == null || component.getParent() == null) {
return;
}
WXVContainer parent = component.getParent();
clearRegistryForComponent(context, component);
parent.remove(component, true);
context.unregisterComponent(mRef);
WXSDKInstance instance = context.getInstance();
if (null != instance) {
instance.onElementChange();
}
}
use of com.taobao.weex.ui.component.WXComponent in project incubator-weex by apache.
the class RemoveEventAction method executeRender.
@Override
public void executeRender(RenderActionContext context) {
WXComponent comp = context.getComponent(mRef);
if (comp != null) {
// sync dom change to component
comp.updateDom(mUpdatedDomObject);
comp.removeEvent(mEvent);
}
}
use of com.taobao.weex.ui.component.WXComponent in project incubator-weex by apache.
the class ScrollToElementAction method executeRender.
@Override
public void executeRender(RenderActionContext context) {
WXComponent component = context.getComponent(mRef);
if (component == null) {
return;
}
Scrollable scroller = component.getParentScroller();
if (scroller == null) {
return;
}
scroller.scrollTo(component, mOptions);
}
use of com.taobao.weex.ui.component.WXComponent in project incubator-weex by apache.
the class DefaultDragHelperTest method onDragStart.
@Test
public void onDragStart() throws Exception {
WXComponent c = new WXCell(WXSDKInstanceTest.createInstance(), new TestDomObject(), null, false);
mFakeDragHelper.onDragStart(c, 3);
verify(mockedEventTrigger).triggerEvent(eq("dragstart"), anyMap());
}
use of com.taobao.weex.ui.component.WXComponent in project incubator-weex by apache.
the class WXListComponentTest method testAddChild.
@Test
public void testAddChild() throws Exception {
WXComponent child = WXDivTest.create(component);
ComponentTest.create(child);
component.addChild(child);
child = WXHeaderTest.create(component);
ComponentTest.create(child);
component.addChild(child);
}
Aggregations