question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Transition doesn`t applies to expression value

See original GitHub issue

Environment

  • Mapbox (GL) implementation: MapboxGL
  • Mapbox (GL) version: [e.g. 6.3.0]
  • @rnmapbox/maps Version #main
  • Platform: iOS
  • React Native Version: 0.69.2
  • Platform OS: iOS 15
  • Device: iPhone X
  • Emulator/ Simulator: simulator and physical device
  • Dev OS: macOS Monterey 12.5

Standalone component to reproduce

import React, { useState, useEffect } from 'react';
import {
  MapView,
  ShapeSource,
  Camera,
  CircleLayer,
} from '@rnmapbox/maps';

const BugReport = () => {
  const [feature, setFeature] = useState({
    type: 'Feature',
    geometry: {
      type: 'Point',
      coordinates: [30.319378097536216, 59.879647222152855],
    },
    properties: {
      accuracy: 10,
    },
  });

  useEffect(() => {
    setInterval(() => {
      setFeature(f => ({
        ...f,
        properties: { accuracy: Math.random() * 100 },
      }));
    }, 5000);
  }, []);

  return (
    <MapView style={{ flex: 1 }}>
      <Camera
        defaultSettings={{
          centerCoordinate: feature.geometry.coordinates,
          zoomLevel: 16,
        }}
      />
      <ShapeSource id='people' shape={feature}>
        <CircleLayer
          id='accuracy'
          sourceID='people'
          style={{
            circleRadius: ['get', 'accuracy'],
            circleRadiusTransition: { duration: 200, delay: 0 },
            circleOpacity: 0.5,
          }}
        />
      </ShapeSource>
    </MapView>
  );
};

Observed behavior and steps to reproduce

https://user-images.githubusercontent.com/13776478/183295101-a2a7dfa2-3b86-45e4-abdd-06c317d030fe.MP4

Expected behavior

https://user-images.githubusercontent.com/13776478/183295242-e58728bf-56fa-43c1-9b6a-58f25bd13d4b.MP4

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mfazekascommented, Aug 11, 2022

@Crysp we’ll need to try with a native iOS example, if that works, we need to figure out what’s different in the RN version. If it doesn’t we need to report as a native mapbox lib issue.

0reactions
Cryspcommented, Aug 12, 2022

@mfazekas thx for reference

Read more comments on GitHub >

github_iconTop Results From Across the Web

React css transition does not work correctly - Stack Overflow
I changed your key value '' + el to '' + index . <div key={'' + index} className={'element element-' + el + '...
Read more >
Applying transitions in Premiere Pro - Adobe Support
Follow this step-by-step guide to select, apply, and customize transitions in Premiere Pro.
Read more >
Animation transitions and triggers - Angular
The * => * transition applies when any change between two states takes place. Transitions are matched in the order in which they...
Read more >
Understanding context transition in DAX - SQLBI
The row context iterates a table, it does not place any filter on the current value. Without CALCULATE and the context transition, ...
Read more >
Expressions Cheatsheet - Adobe After Effects - Good Boy Ninja
Why can't I change the value after applying an expression?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found