Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
react-native-amap3d
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
放牛的园子
react-native-amap3d
Commits
d502d661
Commit
d502d661
authored
Jul 02, 2017
by
Qiu Xiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整 iOS animateTo 参数 duration 的传递
parent
c20f3f86
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
3 deletions
+1
-3
MapView.js
components/MapView.js
+0
-1
AMapViewManager.m
ios/AMapViewManager.m
+1
-2
No files found.
components/MapView.js
View file @
d502d661
...
...
@@ -170,7 +170,6 @@ class MapView extends Component {
)
break
;
case
'ios'
:
params
[
1
]
=
300
NativeModules
.
AMapViewManager
[
command
](
findNodeHandle
(
this
),
params
)
break
;
}
...
...
ios/AMapViewManager.m
View file @
d502d661
...
...
@@ -49,7 +49,6 @@ RCT_EXPORT_METHOD(animateTo:(nonnull NSNumber *)reactTag data:(NSArray *)data) {
[
self
.
bridge
.
uiManager
addUIBlock
:
^
(
__unused
RCTUIManager
*
uiManager
,
NSDictionary
<
NSNumber
*
,
UIView
*>
*
viewRegistry
)
{
AMapView
*
mapView
=
(
AMapView
*
)
viewRegistry
[
reactTag
];
NSDictionary
*
params
=
data
[
0
];
CFTimeInterval
duration
=
[
data
[
1
]
doubleValue
]
/
1000
;
if
(
params
[
@"zoomLevel"
])
{
[
mapView
setZoomLevel
:[
params
[
@"zoomLevel"
]
floatValue
]
animated
:
YES
];
}
...
...
@@ -60,7 +59,7 @@ RCT_EXPORT_METHOD(animateTo:(nonnull NSNumber *)reactTag data:(NSArray *)data) {
[
coordinate
[
@"longitude"
]
doubleValue
])
animated
:
YES
];
}
if
(
params
[
@"tilt"
])
{
[
mapView
setCameraDegree
:[
params
[
@"tilt"
]
floatValue
]
animated
:
YES
duration
:
duration
];
[
mapView
setCameraDegree
:[
params
[
@"tilt"
]
floatValue
]
animated
:
YES
duration
:
0
.
3
];
}
}];
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment