Be careful about the difference between Section extension and Section tool. You are passing the custom options to the extension itself, but the extension does not pass them on to the tool. This is what the extension's load
method looks like:
proto.load = function() {
var that = this;
var viewer = this.viewer;
this.tool = new SectionTool(viewer, {
tintColor: { r: 1, g: 1, b: 0 },
tintIntensity: 0.2
});
viewer.toolController.registerTool(this.tool, this.setActive.bind(this));
this.sectionStyle = null;
this.supportedStyles = ["X", "Y", "Z", "BOX"];
// ...
}
As you can see, the tool options were not meant to be publicly accessible. You could try and hack it, though, by overriding the extension's tool
property after it's been loaded. You'd probably also need to deregister the original SectionTool
instance, and register the new one.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…