MCPcopy Index your code
hub / github.com/wonday/react-native-pdf / onTap

Method onTap

android/src/main/java/org/wonday/pdf/PdfView.java:214–243  ·  view source on GitHub ↗
(MotionEvent e)

Source from the content-addressed store, hash-verified

212 }
213
214 @Override
215 public boolean onTap(MotionEvent e){
216
217 // maybe change by other instance, restore zoom setting
218 //Constants.Pinch.MINIMUM_ZOOM = this.minScale;
219 //Constants.Pinch.MAXIMUM_ZOOM = this.maxScale;
220
221 WritableMap event = Arguments.createMap();
222 event.putString("message", "pageSingleTap|"+page+"|"+e.getX()+"|"+e.getY());
223
224 ThemedReactContext context = (ThemedReactContext) getContext();
225 EventDispatcher dispatcher = UIManagerHelper.getEventDispatcherForReactTag(context, getId());
226 int surfaceId = UIManagerHelper.getSurfaceId(this);
227
228 TopChangeEvent tce = new TopChangeEvent(surfaceId, getId(), event);
229
230 if (dispatcher != null) {
231 dispatcher.dispatchEvent(tce);
232 }
233// ReactContext reactContext = (ReactContext)this.getContext();
234// reactContext.getJSModule(RCTEventEmitter.class).receiveEvent(
235// this.getId(),
236// "topChange",
237// event
238// );
239
240 // process as tap
241 return true;
242
243 }
244
245 @Override
246 public void onLayerDrawn(Canvas canvas, float pageWidth, float pageHeight, int displayedPage){

Callers 1

drawPdfMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected