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