Skip to content

Commit

Permalink
register internal s3 methods
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonynorth committed Aug 11, 2024
1 parent 034deef commit 0d5b368
Show file tree
Hide file tree
Showing 18 changed files with 596 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE, roclets = c("collate", "namespace", "rd",
"roxyglobals::global_roclet"))
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Config/roxyglobals/filename: globals.R
Config/roxyglobals/unique: FALSE
294 changes: 294 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Generated by roxygen2: do not edit by hand

S3method(accessor,default)
S3method(accessor,name)
S3method(accessor,quosure)
S3method(accessor,scale)
S3method(accessor,sf_column)
S3method(add_layer,rdeck)
S3method(add_layer,rdeck_proxy)
S3method(as_breaks,"NULL")
S3method(as_breaks,"function")
S3method(as_breaks,integer)
S3method(as_breaks,numeric)
S3method(as_editor_options,"NULL")
S3method(as_editor_options,cur_value)
S3method(as_editor_options,editor_options)
S3method(as_editor_options,logical)
S3method(as_json,accessor)
S3method(as_json,deck_props)
S3method(as_json,default)
S3method(as_json,editor_options)
S3method(as_json,layer)
S3method(as_json,layer_data)
S3method(as_json,map_props)
S3method(as_json,png)
S3method(as_json,rdeck_data)
S3method(as_json,scale)
S3method(as_json,sf)
S3method(as_json,tile_json)
S3method(as_json,tooltip)
S3method(as_json,view_state)
S3method(as_json,wk_rct)
S3method(color_categories,"function")
S3method(color_categories,character)
S3method(color_gradient,"function")
S3method(color_gradient,character)
S3method(compile,scale_color)
S3method(compile,scale_color_category)
S3method(compile,scale_color_quantile)
Expand All @@ -11,6 +45,10 @@ S3method(compile,scale_numeric_identity)
S3method(compile,scale_numeric_quantile)
S3method(compile,scale_numeric_quantize)
S3method(compile,scale_numeric_threshold)
S3method(number_categories,integer)
S3method(number_categories,numeric)
S3method(number_gradient,integer)
S3method(number_gradient,numeric)
S3method(rescale_center,scale_color)
S3method(rescale_center,scale_color_category)
S3method(rescale_center,scale_numeric)
Expand All @@ -24,6 +62,262 @@ S3method(rescale_diverge,scale_numeric_identity)
S3method(tile_json,"NULL")
S3method(tile_json,character)
S3method(tile_json,mapbox)
S3method(tooltip,"NULL")
S3method(tooltip,call)
S3method(tooltip,character)
S3method(tooltip,cur_value)
S3method(tooltip,logical)
S3method(tooltip,name)
S3method(tooltip,quosure)
S3method(update_layer,rdeck)
S3method(update_layer,rdeck_proxy)
S3method(validate_aggregation,default)
S3method(validate_alpha_cutoff,default)
S3method(validate_angle,default)
S3method(validate_animation_speed,default)
S3method(validate_antialiasing,default)
S3method(validate_auto_highlight,default)
S3method(validate_background,default)
S3method(validate_background_padding,default)
S3method(validate_billboard,default)
S3method(validate_binary,default)
S3method(validate_blending_mode,default)
S3method(validate_bounds,default)
S3method(validate_cap_rounded,default)
S3method(validate_cell_margin_pixels,default)
S3method(validate_cell_size,default)
S3method(validate_cell_size_pixels,default)
S3method(validate_center_hexagon,default)
S3method(validate_color,default)
S3method(validate_color_aggregation,default)
S3method(validate_color_domain,default)
S3method(validate_color_format,default)
S3method(validate_color_range,default)
S3method(validate_color_scale_type,default)
S3method(validate_contours,default)
S3method(validate_coverage,default)
S3method(validate_data,GeoJsonLayer)
S3method(validate_data,MVTLayer)
S3method(validate_data,default)
S3method(validate_data,layer)
S3method(validate_debounce_timeout,default)
S3method(validate_desaturate,default)
S3method(validate_disk_resolution,default)
S3method(validate_elevation_aggregation,default)
S3method(validate_elevation_data,default)
S3method(validate_elevation_decoder,default)
S3method(validate_elevation_domain,default)
S3method(validate_elevation_lower_percentile,default)
S3method(validate_elevation_range,default)
S3method(validate_elevation_scale,default)
S3method(validate_elevation_scale_type,default)
S3method(validate_elevation_upper_percentile,default)
S3method(validate_extent,default)
S3method(validate_extruded,default)
S3method(validate_fade_trail,default)
S3method(validate_filled,default)
S3method(validate_font_family,default)
S3method(validate_font_settings,default)
S3method(validate_font_weight,default)
S3method(validate_get_alignment_baseline,default)
S3method(validate_get_angle,default)
S3method(validate_get_animator,default)
S3method(validate_get_background_color,default)
S3method(validate_get_border_color,default)
S3method(validate_get_border_width,default)
S3method(validate_get_color,default)
S3method(validate_get_color_value,default)
S3method(validate_get_color_weight,default)
S3method(validate_get_elevation,MVTLayer)
S3method(validate_get_elevation,default)
S3method(validate_get_elevation_value,default)
S3method(validate_get_elevation_weight,default)
S3method(validate_get_fill_color,MVTLayer)
S3method(validate_get_fill_color,default)
S3method(validate_get_height,default)
S3method(validate_get_hexagon,default)
S3method(validate_get_hexagons,default)
S3method(validate_get_icon,GeoJsonLayer)
S3method(validate_get_icon,MVTLayer)
S3method(validate_get_icon,default)
S3method(validate_get_icon_angle,MVTLayer)
S3method(validate_get_icon_angle,default)
S3method(validate_get_icon_color,MVTLayer)
S3method(validate_get_icon_color,default)
S3method(validate_get_icon_pixel_offset,MVTLayer)
S3method(validate_get_icon_pixel_offset,default)
S3method(validate_get_icon_size,MVTLayer)
S3method(validate_get_icon_size,default)
S3method(validate_get_line_color,MVTLayer)
S3method(validate_get_line_color,default)
S3method(validate_get_line_width,MVTLayer)
S3method(validate_get_line_width,default)
S3method(validate_get_normal,default)
S3method(validate_get_orientation,default)
S3method(validate_get_path,default)
S3method(validate_get_path,layer)
S3method(validate_get_pixel_offset,default)
S3method(validate_get_point_color,default)
S3method(validate_get_point_radius,MVTLayer)
S3method(validate_get_point_radius,default)
S3method(validate_get_polygon,default)
S3method(validate_get_polygon,layer)
S3method(validate_get_position,default)
S3method(validate_get_position,layer)
S3method(validate_get_quadkey,default)
S3method(validate_get_radius,default)
S3method(validate_get_s2_token,default)
S3method(validate_get_scale,default)
S3method(validate_get_scene,default)
S3method(validate_get_size,default)
S3method(validate_get_source_color,default)
S3method(validate_get_source_position,default)
S3method(validate_get_source_position,layer)
S3method(validate_get_target_color,default)
S3method(validate_get_target_position,default)
S3method(validate_get_target_position,layer)
S3method(validate_get_text,GeoJsonLayer)
S3method(validate_get_text,MVTLayer)
S3method(validate_get_text,default)
S3method(validate_get_text_alignment_baseline,MVTLayer)
S3method(validate_get_text_alignment_baseline,default)
S3method(validate_get_text_anchor,MVTLayer)
S3method(validate_get_text_anchor,default)
S3method(validate_get_text_angle,MVTLayer)
S3method(validate_get_text_angle,default)
S3method(validate_get_text_background_color,MVTLayer)
S3method(validate_get_text_background_color,default)
S3method(validate_get_text_border_color,MVTLayer)
S3method(validate_get_text_border_color,default)
S3method(validate_get_text_border_width,MVTLayer)
S3method(validate_get_text_border_width,default)
S3method(validate_get_text_color,MVTLayer)
S3method(validate_get_text_color,default)
S3method(validate_get_text_pixel_offset,MVTLayer)
S3method(validate_get_text_pixel_offset,default)
S3method(validate_get_text_size,MVTLayer)
S3method(validate_get_text_size,default)
S3method(validate_get_tile_data,default)
S3method(validate_get_tilt,default)
S3method(validate_get_timestamps,default)
S3method(validate_get_transform_matrix,default)
S3method(validate_get_translation,default)
S3method(validate_get_weight,default)
S3method(validate_get_width,default)
S3method(validate_gpu_aggregation,default)
S3method(validate_great_circle,default)
S3method(validate_group_name,default)
S3method(validate_high_precision,default)
S3method(validate_high_precision,layer)
S3method(validate_highlight_color,MVTLayer)
S3method(validate_highlight_color,default)
S3method(validate_highlighted_feature_id,default)
S3method(validate_icon_alpha_cutoff,default)
S3method(validate_icon_atlas,default)
S3method(validate_icon_billboard,default)
S3method(validate_icon_mapping,default)
S3method(validate_icon_size_max_pixels,default)
S3method(validate_icon_size_min_pixels,default)
S3method(validate_icon_size_scale,default)
S3method(validate_icon_size_units,default)
S3method(validate_id,default)
S3method(validate_image,default)
S3method(validate_image,layer)
S3method(validate_intensity,default)
S3method(validate_joint_rounded,default)
S3method(validate_line_billboard,default)
S3method(validate_line_cap_rounded,default)
S3method(validate_line_height,default)
S3method(validate_line_joint_rounded,default)
S3method(validate_line_miter_limit,default)
S3method(validate_line_width_max_pixels,default)
S3method(validate_line_width_min_pixels,default)
S3method(validate_line_width_scale,default)
S3method(validate_line_width_units,default)
S3method(validate_loader,default)
S3method(validate_loop_length,default)
S3method(validate_lower_percentile,default)
S3method(validate_material,default)
S3method(validate_max_cache_byte_size,default)
S3method(validate_max_cache_size,default)
S3method(validate_max_requests,default)
S3method(validate_max_width,default)
S3method(validate_max_zoom,default)
S3method(validate_mesh,default)
S3method(validate_mesh_max_error,default)
S3method(validate_min_zoom,default)
S3method(validate_miter_limit,default)
S3method(validate_name,default)
S3method(validate_offset,default)
S3method(validate_opacity,default)
S3method(validate_outline_color,default)
S3method(validate_outline_width,default)
S3method(validate_pickable,default)
S3method(validate_point_antialiasing,default)
S3method(validate_point_billboard,default)
S3method(validate_point_radius_max_pixels,default)
S3method(validate_point_radius_min_pixels,default)
S3method(validate_point_radius_scale,default)
S3method(validate_point_radius_units,default)
S3method(validate_point_size,default)
S3method(validate_point_type,default)
S3method(validate_point_type,layer)
S3method(validate_position_format,default)
S3method(validate_radius,default)
S3method(validate_radius_max_pixels,default)
S3method(validate_radius_min_pixels,default)
S3method(validate_radius_pixels,default)
S3method(validate_radius_scale,default)
S3method(validate_radius_units,default)
S3method(validate_refinement_strategy,default)
S3method(validate_scenegraph,default)
S3method(validate_size_max_pixels,default)
S3method(validate_size_min_pixels,default)
S3method(validate_size_scale,default)
S3method(validate_size_units,default)
S3method(validate_stroked,default)
S3method(validate_text_background,default)
S3method(validate_text_background_padding,default)
S3method(validate_text_billboard,default)
S3method(validate_text_font_family,default)
S3method(validate_text_font_settings,default)
S3method(validate_text_font_weight,default)
S3method(validate_text_line_height,default)
S3method(validate_text_max_width,default)
S3method(validate_text_outline_color,default)
S3method(validate_text_outline_width,default)
S3method(validate_text_size_max_pixels,default)
S3method(validate_text_size_min_pixels,default)
S3method(validate_text_size_scale,default)
S3method(validate_text_size_units,default)
S3method(validate_text_word_break,default)
S3method(validate_texture,default)
S3method(validate_threshold,default)
S3method(validate_tile_size,default)
S3method(validate_tint_color,default)
S3method(validate_tooltip,default)
S3method(validate_trail_length,default)
S3method(validate_transparent_color,default)
S3method(validate_unique_id_property,default)
S3method(validate_upper_percentile,default)
S3method(validate_vertices,default)
S3method(validate_visibility_toggle,default)
S3method(validate_visible,default)
S3method(validate_weights_texture_size,default)
S3method(validate_width_max_pixels,default)
S3method(validate_width_min_pixels,default)
S3method(validate_width_scale,default)
S3method(validate_width_units,default)
S3method(validate_wireframe,default)
S3method(validate_word_break,default)
S3method(validate_worker_url,default)
S3method(validate_wrap_longitude,default)
S3method(validate_z_offset,default)
S3method(validate_z_range,default)
S3method(validate_zoom_offset,default)
S3method(xy_coords,data.frame)
S3method(xy_coords,default)
S3method(xy_coords,wk_xy)
export("%>%")
export(JS)
export(add_arc_layer)
Expand Down
5 changes: 5 additions & 0 deletions R/accessor.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ accessor <- function(expr, data = NULL) {
UseMethod("accessor", expr)
}

#' @export
accessor.default <- function(expr, data = NULL) {
rlang::eval_tidy(expr)
}

#' @export
accessor.quosure <- function(expr, data = NULL) {
# dispatch off the quosure expression
if (rlang::quo_is_symbol(expr)) {
Expand All @@ -23,10 +25,12 @@ accessor.quosure <- function(expr, data = NULL) {
accessor(rlang::eval_tidy(expr), data)
}

#' @export
accessor.name <- function(expr, data = NULL) {
new_accessor(rlang::as_name(expr))
}

#' @export
accessor.sf_column <- function(expr, data = NULL) {
# sf_column only applicable to sf objects
tidyassert::assert(
Expand All @@ -38,6 +42,7 @@ accessor.sf_column <- function(expr, data = NULL) {
accessor.name(attr(data, "sf_column"), data)
}

#' @export
accessor.scale <- function(expr, data = NULL) {
scale <- expr
scale_limits <- scale$limits %||% scale$levels %||% scale$data
Expand Down
4 changes: 4 additions & 0 deletions R/controls.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ editor_modes <- function() {
is_editor_options <- function(object) inherits(object, "editor_options")

as_editor_options <- function(object) UseMethod("as_editor_options")
#' @export
as_editor_options.editor_options <- function(object) object
#' @export
as_editor_options.cur_value <- function(object) object
#' @export
as_editor_options.NULL <- function(object) NULL
#' @export
as_editor_options.logical <- function(object) if (isTRUE(object)) editor_options() else NULL
Loading

0 comments on commit 0d5b368

Please sign in to comment.