MCPcopy Create free account
hub / github.com/antvis/F2Native / OnPressEnd

Method OnPressEnd

core/graphics/tooltip/TooltipController.cpp:142–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142bool tooltip::ToolTipController::OnPressEnd(event::Event &event) {
143 chart_->GetLogTracer()->trace("%s", "#ToolTipController onPressend");
144
145 if (isTooltips()) {
146 if (configs_[0].contains("onPressEnd") && configs_[0]["onPressEnd"].is_string()) {
147 chart_->InvokeFunction(configs_[0]["onPressEnd"]);
148 }
149
150 bool ret = false;
151 for_each(this->toolTips_.begin(), this->toolTips_.end(), [&](auto &tooltip) {
152 if (tooltip.get() != nullptr) {
153 ret = true;
154 }
155 });
156 if (ret == false) {
157 return false;
158 }
159 } else {
160 if (config_.contains("onPressEnd") && config_["onPressEnd"].is_string()) {
161 chart_->InvokeFunction(config_["onPressEnd"]);
162 }
163
164 if (this->toolTip_.get() == nullptr) {
165 return false;
166 }
167 }
168
169 return this->HideToolTip();
170}
171
172void tooltip::ToolTipController::OnRender() {
173 if (isTooltips()) {

Callers

nothing calls this directly

Calls 7

HideToolTipMethod · 0.95
traceMethod · 0.80
GetLogTracerMethod · 0.80
InvokeFunctionMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected