public static PdfScrollPosition Read(Dictionary<byte, object> par) { var res = new PdfScrollPosition { ownerId = (int) par[(byte) DiscussionParamKey.ShapeOwnerId], X = (double)par[(byte)DiscussionParamKey.OffsetXKey], Y = (double)par[(byte)DiscussionParamKey.OffsetYKey], Zoom = (float)par[(byte)DiscussionParamKey.Zoom], topicId = (int) par[(byte) DiscussionParamKey.ChangedTopicId] }; return res; }
public static PdfScrollPosition Read(Dictionary <byte, object> par) { var res = new PdfScrollPosition { ownerId = (int)par[(byte)DiscussionParamKey.ShapeOwnerId], X = (double)par[(byte)DiscussionParamKey.OffsetXKey], Y = (double)par[(byte)DiscussionParamKey.OffsetYKey], Zoom = (float)par[(byte)DiscussionParamKey.Zoom], topicId = (int)par[(byte)DiscussionParamKey.ChangedTopicId] }; return(res); }
public void SendPdfScrolled(int ownerId, double x, double y, float zoom, int topicId) { if (peer == null || peer.PeerState != PeerStateValue.Connected) return; var req = new PdfScrollPosition {ownerId = ownerId, topicId = topicId, X = x, Y = y, Zoom = zoom}; peer.OpCustom((byte)DiscussionOpCode.PdfScrollChanged, req.ToDict(), true); }
private void OnPdfScroll(PdfScrollPosition scroll) { //if (_mediator.CurrentTopicId != null && // _mediator.CurrentTopicId == scroll.topicId && // _mediator.ExplanationModeEnabled) //{ // ScrollTo(scroll.Y); // _skipNextScrollPosChange = true; //} }
private void OnPdfScroll(PdfScrollPosition scroll) { if (_mediator.CurrentTopicId != null && _mediator.CurrentTopicId == scroll.topicId && _mediator.ExplanationModeEnabled) { _recentSyncedScrollX = scroll.X; _recentSyncedScrollY = scroll.Y; _recentSyncedZoom = scroll.Zoom; SetView(scroll.X, scroll.Y, scroll.Zoom); } }
public void HandlePdfScrollSubmitted(LitePeer peer, PdfScrollPosition req, OperationRequest operationRequest, SendParameters sendParameters) { _doc.PdfScrollPosition = req; _room.Broadcast(peer, req.ToDict(), sendParameters, (byte)DiscussionEventCode.PdfScrollChangedEvent); }