Skip to content

Change function signature of Geom$draw_layer() #3854

Open
@clauswilke

Description

@clauswilke

Several distinct issues have arisen where Geom$draw_layer() needs more info than it is currently given. Specifically, it looks like it would be good to hand it a new object called layer_params (#3116 (comment)) as well as the theme (#2749 (comment)). Is there anything else that we should add, while we're add it?

The current signature is as follows:

draw_layer = function(self, data, params, layout, coord) {

I propose the following signature:

  draw_layer = function(self, data, params, layout, coord, theme, layer_params, ...) 

The ... future-proofs this in case we are still missing something.

@paleolimbot @thomasp85 Are you guys still on board with layer_params as discussed here: #3116 (comment) or has your thinking evolved since then?

We could also now make the function signature

  draw_layer = function(self, data, params, layout, coord, theme, ...) 

and leave the layer_params issue for a future date.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions