首页地图图标改「左图右文」方形卡片 + 同城拥挤扇形拉出排布(批 22)
① 首页地图圆形图标改成方形小卡片:左侧封面图(无封面放 📍),
右侧活动名(10 字截断)+ 地点/参与人摘要(超出 5 位显示「等 N 人」)。
② 同城/邻近(屏幕中心距 <110px)的活动归为一簇,按环形扇开拉到
外围规则排开,SVG 引线连回真实位置;单独的活动原地不动不画线。
判碰用椭圆(横半轴卡宽/纵半轴卡高),并查集聚类,半径 70→300 逐轮
放大;缩放/换视野/改窗口后重排。卡片仍锚定真实坐标,点击进活动。
③ 修复扇开越界:原先固定从正上方开始扇,城市贴近地图上缘时卡片被
甩到容器外(y=-29)、被上方标签栏挡住点不到。改为起始角优先朝向
地图中心、每 22.5° 环绕尝试,且候选点必须落在地图容器边界内;
全部放不下时钳回边界内兜底。
验证:本地全链(含 _map16 真浏览器:3 卡片、扇形拉出、引线、椭圆
判碰、容器边界不越界、5 档视口、点击进详情)全绿。
This commit is contained in:
+37
-16
@@ -1324,23 +1324,44 @@ video.video-thumb.video-thumb-mini {
|
||||
/* 联想选中后回填的详细地址(让人看见记下来的是什么) */
|
||||
.loc-detail { margin-top: 6px; font-size: 12.5px; word-break: break-all; }
|
||||
|
||||
/* ── 22. 首页:旅行地图 + 活动列表两个标签页(批 16)───────────── */
|
||||
/* 一次旅行一枚图标:圆形(有封面放封面,没有放 📍)+ 下面一行活动名 */
|
||||
.home-marker-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; }
|
||||
.home-marker {
|
||||
width: 44px; height: 44px; border-radius: 50%;
|
||||
border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
|
||||
background: var(--surface); overflow: hidden;
|
||||
display: flex; align-items: center; justify-content: center; font-size: 22px;
|
||||
/* ── 22. 首页:旅行地图 + 活动列表两个标签页(批 16,批 22 改卡片)── */
|
||||
/* 一次旅行一枚「方形小卡片」:左边封面图(没有放 📍),右边活动名 +
|
||||
地点/参与人摘要。同城/邻近的旅行被扇开到外围时,用一条引线连回真实位置
|
||||
(线是 marker content 里的 SVG;外层画布 pointer-events:none,
|
||||
不挡底图拖拽,只有卡片本身可点)。 */
|
||||
.home-pin { position: relative; width: 600px; height: 600px; pointer-events: none; }
|
||||
/* AMap 的标记包装层 .amap-marker 尺寸跟着 content(600×600)走、默认可命中,
|
||||
会把别家卡片的点击整层挡住(amap-marker intercepts pointer events)。
|
||||
整层禁掉命中、只留卡片本身可点 —— 点击事件沿 DOM 冒泡,AMap 的
|
||||
marker click 照常触发。 */
|
||||
#home-map-canvas .amap-marker { pointer-events: none !important; }
|
||||
.home-pin svg { position: absolute; left: 0; top: 0; overflow: visible; }
|
||||
.home-pin-line { stroke: #8aa0b8; stroke-width: 1.5; }
|
||||
.home-pin-dot { fill: #3b82f6; }
|
||||
.home-card {
|
||||
position: absolute; transform: translate(-50%, -50%);
|
||||
display: flex; align-items: center; gap: 7px;
|
||||
padding: 5px 10px 5px 5px; background: rgba(255, 255, 255, .96);
|
||||
border: 1px solid var(--border); border-radius: 10px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
|
||||
cursor: pointer; pointer-events: auto;
|
||||
width: max-content; max-width: 190px;
|
||||
}
|
||||
.home-marker img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
.home-marker-emoji { line-height: 1; }
|
||||
.home-marker-label {
|
||||
max-width: 92px; padding: 1px 7px; border-radius: 999px;
|
||||
background: rgba(255, 255, 255, .94); color: var(--text);
|
||||
font-size: 11.5px; line-height: 17px; white-space: nowrap;
|
||||
overflow: hidden; text-overflow: ellipsis;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, .22);
|
||||
.home-card:hover { border-color: var(--accent); }
|
||||
.home-card-img {
|
||||
width: 42px; height: 42px; border-radius: 7px; overflow: hidden; flex: none;
|
||||
background: var(--bg-soft); display: flex; align-items: center; justify-content: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
.home-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
.home-card-body { min-width: 0; }
|
||||
.home-card-title {
|
||||
font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.35;
|
||||
max-width: 122px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
}
|
||||
.home-card-sub {
|
||||
font-size: 11px; color: var(--text-soft); line-height: 1.4; margin-top: 1px;
|
||||
max-width: 122px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* 列表:每行一条 —— 左边封面、右边标题/简述/参与人/摘要 */
|
||||
|
||||
Reference in New Issue
Block a user