-
Notifications
You must be signed in to change notification settings - Fork 26
/
index.js
209 lines (189 loc) · 21.4 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
/**
* Created with WebStorm.
* User: 一晟
* Date: 2018/5/8
* Time: 下午5:28
* email: [email protected]
* To change this template use File | Settings | File Templates.
*/
/* global AMap */
import {
createElement,
Component,
Children,
PureComponent,
findDOMNode,
cloneElement,
unmountComponentAtNode
} from 'rax';
import View from 'rax-view';
// import Picture from 'rax-picture';
import Swiper from './swiper';
const baseImgR = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQwIDc5LjE2MDQ1MSwgMjAxNy8wNS8wNi0wMTowODoyMSAgICAgICAgIj4gPHJkZjpSREYgeG1s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Nzc+fZkgAJABFSdXV1R6dOnTptyJAhR2UgsnjvvffmZmdnz7EhoZj4aMKp5DESexCC5FhgYOA0AiK/pKSkvykk80nER5uHh0c69W/GXkMEEU4NDQ1H/P39p1G6dUqOI4okqdu2bUuCaQcgwnqS5ubmMj8/vxBKtypM2xsbG602btyYcv369TnwIwBESLXXSQ75+vqGUSQ5bdrOD/QpKipKPX/+fCIeTw1AhIWktbW12MfHJ8zT0/M70/aqqiqHL774Yn5lZWUSIIFJl5Wrq+uvMsN88BmnNMZPdPp557anL+ameshtN932sPfSuvE26ecbb6Pf48CoUaMiIyIi8k6fPv2M8fdVV1c7FhYWzlWpVHcGDBiQSX9DK7D4u4R/iKfxwf2oy68B6lEX00emmXuEmrQwhMaLXB/+Xjc3t3Pdu3c/vn///mG3b9/WmXgS23Pnzg2m9pu0HKOo09a1a1fD8xC1Wi1SLOjPDfjDnllo3I+ixJ6UlJSIPn36nDVtv3r1qiY/P3/ZiRMnQijdUmKEq/3kJvpMT+NU6bFPF9qLg2TOR4eHh39A3qPDM567dOlyKzAwMCE0NHSDo6Nja48eYj/wCqcJgSQ9PXf06NFFubm54T179rwgE0nUGzduXHLy5EkfWhd+FjAAEVD8yOfXXnvt65ycnGnkOS6btl+/ft1l27ZtwWfOnHEEIJCQ4of4+Pj4FGVnZ0d069atwwN6ampqNGTQrQEIJKy558dTjx079r843erVq9cl4/aRI0fu1Gg0t0XfT5hnILDaL91VPP/88zvGjBnzZnl5eayzs3PPPn36FBAwG6j9nuj7yALXK0MQUiwIAiAQBEAgCIBAEACBIAACQQAEggAIBAEQCIIACAQBEAgCIBAEQCAIgEAQAIEgAAJBAASCAAgEARAIggAIBAEQCAIgEARAIAiAQBAAgSAAAkEABIIACARBAASCAAgE/XP6PwEGANS8GiZ+ZjvRAAAAAElFTkSuQmCC';
const itemStyle = {
backgroundColor: 'white',
textAlign: 'center',
width: '60%',
border: '1px solid #ccc',
borderRadius: 20,
boxShadow: '1px 1px 10px 0 #ccc',
fontSize: 6,
paddingTop: 1,
paddingBottom: 1,
};
const viewStyle = {
overflow: 'hidden',
position: 'absolute',
width: '100%',
bottom: 0,
zIndex: 999,
paddingTop: 2,
paddingBottom: 2,
justifyContent: 'center'
};
const arrowStyleL = {
width: 10,
height: 10,
lineHeight: 10,
zIndex: 999,
textAlign: 'center',
justifyContent: 'center',
border: '1px solid #ccc',
borderRadius: 10,
backgroundColor: 'white',
boxShadow: '1px 1px 10px 0 #ccc',
marginLeft: 10
};
const arrowStyleR = {
width: 10,
height: 10,
lineHeight: 10,
zIndex: 999,
textAlign: 'center',
justifyContent: 'center',
border: '1px solid #ccc',
borderRadius: 10,
backgroundColor: 'white',
boxShadow: '1px 1px 10px 0 #ccc',
marginRight: 10
};
const arrowStyle = {
position: 'absolute',
flexDirection: 'row',
alignContent: 'center',
width: '100%',
justifyContent: 'space-between'
};
let scope = null;
const DetailSwiper = (props) => {
const map = props.__map__;
const mapStore = props.__ele__;
const render = props.render; // 底部 card 的渲染样式
const loop = props.loop || true; // card 是否支持轮播
const autoPlay = props.autoPlay || false; // 是否支持自动播放
const arrowRender = props.arrowRender;// 箭头的渲染样式
const animationEndHanler = props.animationEndHanler; // 底部 `card` 每次滑动效果结束触发的事件
const currentZoom = map.getZoom();
/* markers dom 对象个数 */
const getChildrenNum = () => {
let $amap_markers = document.querySelectorAll('.amap-marker');
return $amap_markers ? $amap_markers.length + 1 : 0;
};
const getChildren = () => {
let list = [];
if (map) {
return map.getAllOverlays('marker');
}
};
const getScope = (arg) => {
scope = arg;
};
const markerGoCenter = () => {
setTimeout(() => {
const children = getChildren();
const index = scope.state.index;
const marker = children[index];
if (children && marker) {
const positon = marker.getPosition();
map.setCenter(positon);
}
}, 0);
};
const arrowHandler = (dir) => {
if (dir === 'left') {
scope.pre();
markerGoCenter();
} else {
scope.next();
markerGoCenter();
}
};
if (!map) {
console.log('组件必须作为 Map 的子组件使用');
return;
} else {
if (!window.changeSwiperLabel) {
window.changeSwiperLabel = () => {
setTimeout(() => {
const mapCenter = map.getCenter();
const children = getChildren();
const index = children.findIndex((item) => {
const pos = item.getPosition();
return String(pos.lng) === String(mapCenter.lng) && String(pos.lat) === String(mapCenter.lat);
});
if (scope && index >= 0) {
scope.setMyState(index, true);
}
}, 0);
};
map.on('moveend', window.changeSwiperLabel);
}
// if(window.AMap){
// window.AMap.event.removeListener("moveend");
// window.AMap.event.addListenerOnce(map, "moveend", changeSwiperLabel);
// }
}
return (
<View style={viewStyle}>
<Swiper ref="swiper" autoPlay={autoPlay} loop={loop} width={1} previewWidth={298} getScope={getScope}
animationEndHanler={animationEndHanler}>
{
getChildren().map((item) => {
console.log('ok=>', item.getExtData());
return (
render instanceof Function ?
render() :
<View style={itemStyle}>
{item.getExtData().cacheIndex}:
{item.getExtData().myLabel}
</View>
);
})
}
</Swiper>
<View style={arrowStyle}>
{
arrowRender instanceof Function ? arrowRender('left') :
<View style={{justifyContent: 'center'}} onClick={arrowHandler.bind(this, 'left')}>
{/* <Picture source={{uri: baseImgL}} */}
{/* style={arrowStyleL} */}
{/* resizeMode={'cover'} /> */}
<View style={arrowStyleL}> {'◀'} </View>
</View>
}
{
arrowRender instanceof Function ? arrowRender('right') :
<View style={{justifyContent: 'center'}} onClick={arrowHandler.bind(this, 'left')}>
{/* <Picture source={{uri: baseImgR}} */}
{/* style={arrowStyleR} */}
{/* resizeMode={'cover'} /> */}
<View style={arrowStyleR}> {'▶'} </View>
</View>
}
</View>
</View>
);
}
;
export default DetailSwiper;