mirror of
https://github.com/awatertrevi/xamarin-neo4j.git
synced 2026-09-22 09:05:29 +00:00
Merge branch 'main' of github.com:awatertrevi/xamarin-neo4j
This commit is contained in:
@@ -182,11 +182,16 @@
|
||||
<StackLayout Spacing="15" Padding="9,16,9,32">
|
||||
<Label Text="A product of" HorizontalOptions="Center" FontAttributes="Italic" FontSize="12"
|
||||
TextColor="{DynamicResource SecondaryTextColor}" />
|
||||
<Image Source="resoftware.png" HorizontalOptions="Center" WidthRequest="100">
|
||||
<Image.GestureRecognizers>
|
||||
<Border HorizontalOptions="Center"
|
||||
BackgroundColor="#ffffff"
|
||||
StrokeThickness="0"
|
||||
StrokeShape="RoundRectangle 12"
|
||||
Padding="16,8">
|
||||
<Border.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding Commands[OpenReSoftwareSite]}" />
|
||||
</Image.GestureRecognizers>
|
||||
</Image>
|
||||
</Border.GestureRecognizers>
|
||||
<Image Source="resoftware.png" WidthRequest="90" />
|
||||
</Border>
|
||||
</StackLayout>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<title>Graph</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<style>
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html, body { width: 100%; height: 100%; overflow: hidden; background: {{backgroundColor}}; }
|
||||
@@ -12,8 +12,12 @@
|
||||
#panel-backdrop {
|
||||
display: none;
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 55%;
|
||||
z-index: 90;
|
||||
pointer-events: none;
|
||||
}
|
||||
#panel {
|
||||
position: fixed;
|
||||
@@ -923,7 +927,7 @@
|
||||
}
|
||||
|
||||
// ---- expand / collapse ----
|
||||
var lastTapTime = 0, lastTapNode = null;
|
||||
var lastTapTime = 0, lastTapNode = null, singleTapTimer = null;
|
||||
var expandedBy = {}; // nodeId -> [childIds added by expanding that node]
|
||||
|
||||
// initial nodes are never collapsible
|
||||
@@ -1087,7 +1091,7 @@
|
||||
|
||||
function handleStart(e) {
|
||||
if (e.touches) e.preventDefault();
|
||||
if (panelOpen) return; // don't start drag while panel is open
|
||||
if (e.touches && e.touches.length >= 2) return; // pinch handled separately
|
||||
notifyInteraction();
|
||||
var p = coordFromEvent(e);
|
||||
ptrStartX = ptrEndX = p.x;
|
||||
@@ -1125,16 +1129,24 @@
|
||||
if (!moved && dt < 300) {
|
||||
var hit = nodeAt(ptrStartX, ptrStartY);
|
||||
var now = Date.now();
|
||||
// double-tap detection — toggle expand/collapse
|
||||
// double-tap detection — only expand/collapse, no panel
|
||||
if (hit && hit === lastTapNode && (now - lastTapTime) < 400) {
|
||||
lastTapNode = null; lastTapTime = 0;
|
||||
if (singleTapTimer) { clearTimeout(singleTapTimer); singleTapTimer = null; }
|
||||
toggleExpandCollapse(hit);
|
||||
} else if (hit) {
|
||||
lastTapNode = hit; lastTapTime = now;
|
||||
if (hit === selected && panelOpen) hidePanel();
|
||||
else showNodePanel(hit);
|
||||
// Delay panel open to distinguish from double-tap
|
||||
var tappedNode = hit;
|
||||
if (singleTapTimer) clearTimeout(singleTapTimer);
|
||||
singleTapTimer = setTimeout(function () {
|
||||
singleTapTimer = null;
|
||||
if (tappedNode === selected && panelOpen) hidePanel();
|
||||
else showNodePanel(tappedNode);
|
||||
}, 350);
|
||||
} else {
|
||||
lastTapNode = null; lastTapTime = 0;
|
||||
if (singleTapTimer) { clearTimeout(singleTapTimer); singleTapTimer = null; }
|
||||
var hitEdge = edgeAt(ptrStartX, ptrStartY);
|
||||
if (hitEdge) {
|
||||
if (hitEdge === selectedEdge && panelOpen) hidePanel();
|
||||
|
||||
Reference in New Issue
Block a user