I know this is really simple but I cant find the docs for this anywhere.
What i want to do is detect when an update has been sent by the current client so that the event is not reproduced locally.
I want to be able to get the client ID and the caller ID inside a signalR event to ignore ones where they match.
<script type="text/javascript">
$(function () {
var drag = $.connection.drag;
drag.move = function ( x, y,clientId) {
if(clientId!== drag.clientId) //<-IE something like this (but this doesnt work)
$("#box").offset({ top: y, left: x });
};
$("#box").draggable({
drag: function (event, ui) {
drag.sendMove(ui.position.left, ui.position.y);
}
});
$.connection.hub.start();
});
</script>
The connection id is
$.connection.hub.id.You can use that to block calls to yourself on the client side. This feature isn’t enable on the server side as yet.