update spectating coordinates in "spectate" mode
809
function(client, packet) {
            var x    = packet.readFloat32LE();
            var y    = packet.readFloat32LE();
            var zoom = packet.readFloat32LE();

            if(client.debug >= 4)
                client.log('spectate FOV update: x=' + x + ' y=' + y + ' zoom=' + zoom);

            client.emitEvent('spectateFieldUpdate', x, y, zoom);
        }
794051
function(evt, x, y) {

        if (!this.can('vertexAdd')) return;

        // Store the index at which the new vertex has just been placed.
        // We'll be update the very same vertex position in `pointermove()`.
        var vertexIdx = this.addVertex({ x: x, y: y }, { ui: true });
        this.eventData(evt, {
            action: 'vertex-move',
            vertexIdx: vertexIdx
        });
    }
1168092
def _update(self, frame_no):
        """"""
        # Check for any fatal errors from the background thread and quit if we hit anything.
        if self._oops:
            raise RuntimeError(self._oops)

        # Calculate new positions for animated movement.
        self._move_to_desired_location()

        # Re-draw the tiles - if we have any suitable ones downloaded.
        count = 0
        x_offset = self._convert_longitude(self._longitude)
        y_offset = self._convert_latitude(self._latitude)
        if self._tiles:
            # Clear the area first.
            bg = 253 if self._screen.unicode_aware and self._screen.colours >= 256 else 0
            for y in range(self._screen.height):
                self._screen.print_at("." * self._screen.width, 0, y, colour=bg, bg=bg)

            # Now draw all the available tiles.
            count = self._draw_tiles(x_offset, y_offset, bg)

        # Just a few pointers on what the user should do...
        if count == 0:
            self._screen.centre(" Loading - please wait... ", self._screen.height // 2, 1)

        self._screen.centre("Press '?' for help.", 0, 1)
        if _KEY == "":
            footer = "Using local cached data - go to https://www.mapbox.com/ and get a free key."
        else:
            footer = u"Zoom: {} Location: {:.6}, {:.6} Maps: © Mapbox, © OpenStreetMap".format(
                self._zoom, self._longitude, self._latitude)
        self._screen.centre(footer, self._screen.height - 1, 1)

        return count
1038418
def _updateEndpoints(self,*args,**kwargs):
        

        sender = self.sender()
        if not self.ignoreEvents:
            self.ignoreEvents = True

            for binding in self.bindings.values():
                if binding.instanceId == id(sender):
                    continue
                
                if args: 
                    binding.setter(*args,**kwargs)
                else:
                    binding.setter(self.bindings[id(sender)].getter())

            self.ignoreEvents = False
943715
def _update_camera(self, camera_center):
    """"""
    self._world_tl_to_world_camera_rel.offset = (
        -self._world_to_world_tl.fwd_pt(camera_center) *
        self._world_tl_to_world_camera_rel.scale)

    if self._feature_screen_px:
      camera_radius = (self._feature_screen_px / self._feature_screen_px.x *
                       self._feature_camera_width_world_units / 2)
      center = camera_center.bound(camera_radius,
                                   self._map_size - camera_radius)
      self._camera = point.Rect(
          (center - camera_radius).bound(self._map_size),
          (center + camera_radius).bound(self._map_size))
207513
public void updateState()
  {
/*
    if( _editor.getCaretPosition() == _iCaretPos )
    {
      if( isOtherPopupShowing() )
      {
        resetSmartHelpState();
      }      
      return;
    }

*/
    resetSmartHelpState();

    if( isOtherPopupShowing() )
    {
      return; //don't clobber existing popups
    }

    //Iterate through all the closest issues within one line of the current cursor and offer to fix the closest one
    final List<IParseIssue> parseIssues = findParseIssuesOrderedByDistanceFromCaret( 1 );
    setMode( SmartFixMode.NONE );
    for( Highlighter.Highlight highlight : _editor.getHighlighter().getHighlights() )
    {
      if( highlight.getPainter() instanceof SmartFixHighlightPainter )
      {
        _editor.getHighlighter().removeHighlight( highlight );
      }
    }
    final Set<String> processed = new HashSet<String>();
//    if (isModeAvailable(SmartFixMode.CONVERT_STRING_TO_DISPLAY_KEY)) {
//      int lineNum = _gosuEditor.getLineNumberAtCaret();
//      Element line = _gosuEditor.getEditor().getDocument().getDefaultRootElement().getElement(lineNum - 1);
//      try {
//        if (_gosuEditor.getEditor().getText(line.getStartOffset(), line.getEndOffset() - line.getStartOffset()).contains("\"")) {
//          IParseTree locationAtCaret = _gosuEditor.getDeepestLocationAtCaret();
//          if (offerToTurnStringLiteralToDisplayKey(locationAtCaret)) {
//            _stringLiteralLocationToReplace = locationAtCaret;
//            return;
//          }
//        }
//      } catch (BadLocationException e) {
//        // ignore
//      }
//    }

    final ITypeUsesMap[] uses = new ITypeUsesMap[]{_gosuEditor.getTypeUsesMapFromMostRecentParse()};

    Runnable runnable = new Runnable()
    {
      @Override
      public void run()
      {
        if( uses[0] == null )
        {
          _gosuEditor.waitForParser();
          uses[0] = _gosuEditor.getTypeUsesMapFromMostRecentParse();
        }
        for( IParseIssue parseIssue : parseIssues )
        {
          IParsedElement source = parseIssue.getSource();
          if( isModeAvailable( SmartFixMode.IMPORT ) && _gosuEditor.acceptsUses() && handlePossibleImportFix( source, uses[0], processed ) )
          {
            setMode( SmartFixMode.IMPORT );
            return;
          }
          else if( isModeAvailable( SmartFixMode.FIX_IMPLICIT_CAST ) && isImplictCoercion( parseIssue ) )
          {
            setMode( SmartFixMode.FIX_IMPLICIT_CAST );
            return;
          }
          else if( isModeAvailable( SmartFixMode.FIX_CTOR_SYNTAX ) && isObsoleteConstructor( parseIssue ) )
          {
            setMode( SmartFixMode.FIX_CTOR_SYNTAX );
            return;
          }
          else if( isModeAvailable( SmartFixMode.FIX_JAVA_STYLE_CAST ) && isJavaStyleCast( parseIssue ) )
          {
            setMode( SmartFixMode.FIX_JAVA_STYLE_CAST );
            return;
          }
//          else if( isModeAvailable(SmartFixMode.CREATE_DISPLAY_KEY) && isPossibleDisplayKey( parseIssue ) )
//          {
//            setMode( SmartFixMode.CREATE_DISPLAY_KEY );
//            return;
//          }
          if( isModeAvailable( SmartFixMode.ADD_MISSING_OVERRIDE ) && isMissingOverride( parseIssue ) )
          {
            setMode( SmartFixMode.ADD_MISSING_OVERRIDE );
            return;
          }
          else if( isModeAvailable( SmartFixMode.FIX_CASE ) && isCaseIssue( parseIssue ) )
          {
            setMode( SmartFixMode.FIX_CASE );
            return;
          }
          else if( isModeAvailable( SmartFixMode.FIX_RETURN_TYPE ) && isVoidReturnTypeIssue( parseIssue ) )
          {
            setMode( SmartFixMode.FIX_RETURN_TYPE );
            return;
//          else if( isModeAvailable( SmartFixMode.IMPL_FUNCTIONS ) && showImplementPopup(parseIssue))
//          {
//            setMode( SmartFixMode.IMPL_FUNCTIONS );
//            return;
          }
          else if( isModeAvailable( SmartFixMode.GENERATE_CONSTRUCTORS ) && isMissingConstructor( parseIssue ) )
          {
            setMode( SmartFixMode.GENERATE_CONSTRUCTORS );
            return;
          }
          else if( isModeAvailable( SmartFixMode.GENERATE_SUPER_CALL ) && isMissingSuperCall( parseIssue ) )
          {
            setMode( SmartFixMode.GENERATE_SUPER_CALL );
            return;
          }
        }
      }
    };

    editor.util.EditorUtilities.doBackgroundOp( runnable );
  }
324488
protected void updateTrackState( SetTrackInfo<Desc> info ) {
		// update tracks
		for( int i = 0; i < info.matches.size; i++ ) {
			AssociatedIndex indexes = info.matches.data[i];
			PointTrack track = info.tracks.get(indexes.src);
			Point2D_F64 loc = info.locDst.data[indexes.dst];
			track.set(loc.x, loc.y);
			tracksActive.add(track);

			// update the description
			if(updateDescription) {
				((Desc)track.getDescription()).setTo(info.featDst.get(indexes.dst));
			}

			info.isAssociated[indexes.src] = true;
		}
	}
1310483
private void updateCoord(MouseEvent event)
    {
        oldX = x;
        oldY = y;
        x = event.getXOnScreen();
        y = event.getYOnScreen();
        wx = event.getX();
        wy = event.getY();
        mx = x - oldX;
        my = y - oldY;
    }
1116901
private void updatePov() {
		MapView mapView = getMapModel().getMapView();
		WorldViewTransformer transformer = new WorldViewTransformer(mapView);
		Bbox targetBox = targetMap.getMapModel().getMapView().getBounds();
		Bbox overviewBox = mapView.getBounds();

		// check if bounds are valid
		if (Double.isNaN(overviewBox.getX())) {
			return;
		}

		// zoom if current view is too small
		if (dynamicOverview && !overviewBox.contains(targetBox)) {
			// mapView.applyBounds(overviewBox.union(targetBox), MapView.ZoomOption.LEVEL_FIT);
			// super.onMapViewChanged(null);
		}

		// calculate boxSize
		Coordinate viewBegin = transformer.worldToView(targetBox.getOrigin());
		Coordinate viewEnd = transformer.worldToView(targetBox.getEndPoint());

		double width = Math.abs(viewEnd.getX() - viewBegin.getX());
		double height = Math.abs(viewEnd.getY() - viewBegin.getY());
		viewBegin.setY(viewBegin.getY() - height);

		// show recticle or box
		if (width < 20) {
			if (null != targetRectangle) {
				render(targetRectangle, RenderGroup.SCREEN, RenderStatus.DELETE);
				targetRectangle = null;
			}
			if (null == targetReticle) {
				targetReticle = new Image("targetReticle");
				targetReticle.setHref(Geomajas.getIsomorphicDir() + TARGET_RETICLE_IMAGE);
				targetReticle.setBounds(new Bbox(0, 0, 21, 21));
			}
			double x = viewBegin.getX() + (width / 2) - 10;
			double y = viewBegin.getY() + (width / 2) - 10;
			targetReticle.getBounds().setX(x);
			targetReticle.getBounds().setY(y);
			render(targetReticle, RenderGroup.SCREEN, RenderStatus.UPDATE);

		} else {
			if (null != targetReticle) {
				render(targetReticle, RenderGroup.SCREEN, RenderStatus.DELETE);
				targetReticle = null;
			}
			if (null == targetRectangle) {
				targetRectangle = new Rectangle("targetRect");
				targetRectangle.setStyle(rectangleStyle);
			}
			targetRectangle.setBounds(new Bbox(viewBegin.getX(), viewBegin.getY(), width, height));
			render(targetRectangle, RenderGroup.SCREEN, RenderStatus.UPDATE);
		}
	}
1359620
def _update_rotation(self, event):
        """"""
        p2 = event.mouse_event.pos
        if self._event_value is None:
            self._event_value = p2
        wh = self._viewbox.size
        self._quaternion = (Quaternion(*_arcball(p2, wh)) *
                            Quaternion(*_arcball(self._event_value, wh)) *
                            self._quaternion)
        self._event_value = p2
        self.view_changed()
1356191
private void updateImage() {
		if (!over) {
			currentImage = normalImage;
			currentColor = normalColor;
			state = NORMAL;
			mouseUp = false;
		} else {
			if (mouseDown) {
				if ((state != MOUSE_DOWN) && (mouseUp)) {
					if (mouseDownSound != null) {
						mouseDownSound.play();
					}
					currentImage = mouseDownImage;
					currentColor = mouseDownColor;
					state = MOUSE_DOWN;
					
					notifyListeners();
					mouseUp = false;
				}
				
				return;
			} else {
				mouseUp = true;
				if (state != MOUSE_OVER) {
					if (mouseOverSound != null) {
						mouseOverSound.play();
					}
					currentImage = mouseOverImage;
					currentColor = mouseOverColor;
					state = MOUSE_OVER;
				}
			}
		}

		mouseDown = false;
		state = NORMAL;
	}
341540
def update_position(self, newpos):
        ''''''
        if getattr(self, 'trail', None) is not None:
            self.trail.update_position(newpos)
        self.latlon = newpos.latlon
        if hasattr(self, 'rotation'):
            self.rotation = newpos.rotation
701508
def update(self):
        """"""
        if not self._continuous_sampling \
                or self._light_level < 0 \
                or self._operation_mode != self._mode:
            self._reset()
            self._set_mode(self._operation_mode)
            self._wait_for_result()
        self._light_level = self._get_result()
        if not self._continuous_sampling:
            self._power_down()
181896
def _update_position(self, change):
        
        if change['type']!='update':
            return
        pt = gp_Pnt(self.x,self.y,self.z)
        if not pt.IsEqual(self.position,self.tolerance):
            self.position = pt
637083
def _update_camera(self, camera_center):
    """"""
    self._world_tl_to_world_camera_rel.offset = (
        -self._world_to_world_tl.fwd_pt(camera_center) *
        self._world_tl_to_world_camera_rel.scale)
775392
def update_view_bounds(self):
        """"""
        self.view_bounds.left = self.pan.X - self.world_center.X
        self.view_bounds.top = self.pan.Y - self.world_center.Y
        self.view_bounds.width = self.world_center.X * 2
        self.view_bounds.height = self.world_center.Y * 2
261029
function(evt) {
        var pos = OpenLayers.Util.pagePosition(this.map.viewPortDiv);
        evt.xy.x -= pos[0];
        evt.xy.y -= pos[1];
    }