sigplot icon indicating copy to clipboard operation
sigplot copied to clipboard

Feature request: change z-order of type1000 layers after creating them

Open btgoodwin opened this issue 7 years ago • 3 comments

Current behavior: the creation of the layer (e.g., overlay_pipe) establishes the z-order of the layer when drawing each layer.

What we would like to do is re-order layers in the event a signal on layer 1 needs to temporarily be displayed ahead of layer 0 (0 and 1 being indices into the layer list).

btgoodwin avatar Feb 08 '18 20:02 btgoodwin

@btgoodwin how does this API look: https://github.com/LGSInnovations/sigplot/blob/17b1a24ea33e8f607ef1642ef843b9e5a43fbad2/test/tests.js#L4950

If this looks good to you I will merge this onto the mainline.

maihde avatar May 18 '18 01:05 maihde

Thanks, I like that. @tplumley, FYI as we rebase against the new 2.0 master.

I haven't gone through the code, but what would happen if I set a z-order of 3 and then pushed several layers (such that 0, 1, 2, ...)? Would that next layer end up at zOrder 4, skipping 3 since that one was manually assigned?

btgoodwin avatar May 18 '18 19:05 btgoodwin

Currently you would end up with:

Layer 1 - zOrder 3 Layer 2 - zOrder 1 Layer 3 - zOrder 2 Layer 4 - zOrder 3

But your inquiry brings up a good point. I'm going to change that so that new layers are always added on top of all existing layers (i.e. new layers zOrder = max(zOrder)+1) unless a zOrder was explicitly provided. I'll update that tonight and push new changes to this branch.

~Michael

On Fri, May 18, 2018 at 3:52 PM, Thomas Goodwin [email protected] wrote:

Thanks, I like that. @tplumley https://github.com/tplumley, FYI as we rebase against the new 2.0 master.

I haven't gone through the code, but what would happen if I set a z-order of 3 and then pushed several layers (such that 0, 1, 2, ...)? Would that next layer end up at zOrder 4, skipping 3 since that one was manually assigned?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LGSInnovations/sigplot/issues/16#issuecomment-390314758, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOCInvdcI0zDrHufSC2PSzcGvv5-_FBks5tzyaZgaJpZM4R-_qf .

maihde avatar May 18 '18 20:05 maihde