简体   繁体   中英

The opacity does not cover the objects which are below in Jsxgraph

It seems that opacity:1 doesn't mask what is drawn before the new object. For instance, if I draw a line from a point which is also the center of a circle, I expect that with opacity:1, I will not see the line until the border of the circle.

JSXGraph uses a layer model, see https://jsxgraph.org/wiki/index.php/Working_with_layers . Higher layer means, an element is "above" another element. Otherwise, geometry construction would not be possible. You can either set the layer of an element class globally, as in the example, like

JXG.Options.layer.point = 7;
JXG.Options.layer.line = 9;

or set it on case by case basis:

var line = board.create('line', [...], {layer: 9});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM