Skip to content

Commit

Permalink
add size to renderer function (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaCras committed Oct 28, 2022
1 parent 42a6dd7 commit d4fbfe4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions example/lib/pages/polygon_custom.dart
Expand Up @@ -51,6 +51,7 @@ class TriangleShape extends IntervalShape {
}

List<Figure> simpleTooltip(
Size size,
Offset anchor,
Map<int, Tuple> selectedTuples,
) {
Expand Down Expand Up @@ -131,6 +132,7 @@ List<Figure> simpleTooltip(
}

List<Figure> centralPieLabel(
Size size,
Offset anchor,
Map<int, Tuple> selectedTuples,
) {
Expand Down
2 changes: 2 additions & 0 deletions lib/src/guide/interaction/tooltip.dart
Expand Up @@ -19,6 +19,7 @@ import 'package:graphic/src/util/assert.dart';
/// The [anchor] is the result either set directly or calculated. The keys of [selectedTuples]
/// are indexes of the tuples in the whole data set.
typedef TooltipRenderer = List<Figure> Function(
Size size,
Offset anchor,
Map<int, Tuple> selectedTuples,
);
Expand Down Expand Up @@ -268,6 +269,7 @@ class TooltipRenderOp extends Render<TooltipScene> {
List<Figure> figures;
if (renderer != null) {
figures = renderer(
size,
anchorRst,
selectedTuples,
);
Expand Down

0 comments on commit d4fbfe4

Please sign in to comment.