From 4dd7644596b9dc1f76ca0ce1a99897467809c166 Mon Sep 17 00:00:00 2001
From: Ivan Usov <ivan.usov@psi.ch>
Date: Wed, 15 Feb 2023 14:42:37 +0100
Subject: [PATCH] Remove hkl arrows

---
 pyzebra/app/panel_ccl_prepare.py | 21 ---------------------
 pyzebra/app/plot_hkl.py          | 26 --------------------------
 2 files changed, 47 deletions(-)

diff --git a/pyzebra/app/panel_ccl_prepare.py b/pyzebra/app/panel_ccl_prepare.py
index f32371c..ff69691 100644
--- a/pyzebra/app/panel_ccl_prepare.py
+++ b/pyzebra/app/panel_ccl_prepare.py
@@ -7,7 +7,6 @@ import tempfile
 import numpy as np
 from bokeh.layouts import column, row
 from bokeh.models import (
-    Arrow,
     Button,
     CheckboxGroup,
     ColumnDataSource,
@@ -16,7 +15,6 @@ from bokeh.models import (
     Legend,
     LegendItem,
     MultiSelect,
-    NormalHead,
     NumericInput,
     Panel,
     RadioGroup,
@@ -423,17 +421,6 @@ def create():
         grid_source.data.update(xs=xs, ys=ys)
         minor_grid_source.data.update(xs=xs_minor, ys=ys_minor)
 
-        arrow1.visible = True
-        arrow1.x_end = x_c[0]
-        arrow1.y_end = x_c[1]
-        arrow2.visible = True
-        arrow2.x_end = y_c[0]
-        arrow2.y_end = y_c[1]
-
-        kvect_source.data.update(
-            x=[x_c[0] / 2, y_c[0] / 2 - 0.1], y=[x_c[1] - 0.1, y_c[1] / 2], text=["h", "k"]
-        )
-
         def _update_slice():
             cut_tol = hkl_delta.value
             cut_or = hkl_cut.value
@@ -548,14 +535,6 @@ def create():
         source=scatter_source, marker="m", size="s", fill_color="c", line_color="c"
     )
 
-    arrow1 = Arrow(x_start=0, y_start=0, x_end=0, y_end=0, end=NormalHead(size=10), visible=False)
-    plot.add_layout(arrow1)
-    arrow2 = Arrow(x_start=0, y_start=0, x_end=0, y_end=0, end=NormalHead(size=10), visible=False)
-    plot.add_layout(arrow2)
-
-    kvect_source = ColumnDataSource(dict(x=[], y=[], text=[]))
-    plot.text(source=kvect_source)
-
     plot.add_layout(Legend(items=[], location="top_left", click_policy="hide"))
 
     hkl_div = Div(text="HKL:", margin=(5, 5, 0, 5))
diff --git a/pyzebra/app/plot_hkl.py b/pyzebra/app/plot_hkl.py
index d81a0ce..f788d1e 100644
--- a/pyzebra/app/plot_hkl.py
+++ b/pyzebra/app/plot_hkl.py
@@ -5,7 +5,6 @@ import os
 import numpy as np
 from bokeh.layouts import column, row
 from bokeh.models import (
-    Arrow,
     Button,
     CheckboxGroup,
     ColumnDataSource,
@@ -13,11 +12,9 @@ from bokeh.models import (
     FileInput,
     Legend,
     LegendItem,
-    NormalHead,
     NumericInput,
     RadioGroup,
     Range1d,
-    Spacer,
     Spinner,
     TextAreaInput,
     TextInput,
@@ -210,17 +207,6 @@ class PlotHKL:
             grid_source.data.update(xs=xs, ys=ys)
             minor_grid_source.data.update(xs=xs_minor, ys=ys_minor)
 
-            arrow1.visible = True
-            arrow1.x_end = x_c[0]
-            arrow1.y_end = x_c[1]
-            arrow2.visible = True
-            arrow2.x_end = y_c[0]
-            arrow2.y_end = y_c[1]
-
-            kvect_source.data.update(
-                x=[x_c[0] / 2, y_c[0] / 2 - 0.1], y=[x_c[1] - 0.1, y_c[1] / 2], text=["h", "k"]
-            )
-
             # Prepare hkl/mhkl data
             hkl_coord2 = []
             for j, fname in enumerate(upload_hkl_fi.filename):
@@ -377,18 +363,6 @@ class PlotHKL:
         plot.yaxis.visible = False
         plot.ygrid.visible = False
 
-        arrow1 = Arrow(
-            x_start=0, y_start=0, x_end=0, y_end=0, end=NormalHead(size=10), visible=False
-        )
-        plot.add_layout(arrow1)
-        arrow2 = Arrow(
-            x_start=0, y_start=0, x_end=0, y_end=0, end=NormalHead(size=10), visible=False
-        )
-        plot.add_layout(arrow2)
-
-        kvect_source = ColumnDataSource(dict(x=[], y=[], text=[]))
-        plot.text(source=kvect_source)
-
         grid_source = ColumnDataSource(dict(xs=[], ys=[]))
         plot.multi_line(source=grid_source, line_color="gray")