点击时如何禁用单个单元格选择? Example
我正是这样尝试的:
class CustomDefaultSelectionBindings extends DefaultSelectionBindings {
@Override
protected void configureBodyMouseClickBindings(final UiBindingRegistry uiBindingRegistry) {
//do nothing
}
}
class CustomDefaultSelectionLayerConfiguration extends DefaultSelectionLayerConfiguration {
@Override
protected void addSelectionUIBindings() {
addConfiguration(new CustomDefaultSelectionBindings());
}
}
final SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer);
selectionLayer.addConfiguration(new CustomDefaultSelectionLayerConfiguration());
提前谢谢。
答案 0 :(得分:0)
您需要创建没有默认配置的SelectionLayer
final SelectionLayer selectionLayer = new SelectionLayer(bodyDataLayer, false);
selectionLayer.addConfiguration(new CustomDefaultSelectionLayerConfiguration());
但是使用上述解决方案,由于鼠标拖动模式,您仍然可以选择身体。简单的方法是不使用SelectionLayer
无论如何。不确定你有其他要求。