+
+ setModalViewMode("diagram")}
+ />
+ setModalViewMode("code")}
+ />
+
+
+
+ setShowModal(false)}
+ title={t("common:mermaid.buttons.close")}
+ />
+
+
+
+ {modalViewMode === "diagram" ? (
+ <>
+
{
+ setIsDragging(true)
+ e.preventDefault()
+ }}
+ onMouseMove={(e) => {
+ if (isDragging) {
+ setDragPosition((prev) => ({
+ x: prev.x + e.movementX / zoomLevel,
+ y: prev.y + e.movementY / zoomLevel,
+ }))
+ }
+ }}
+ onMouseUp={() => setIsDragging(false)}
+ onMouseLeave={() => setIsDragging(false)}>
+ {containerRef.current && containerRef.current.innerHTML && (
+
+ )}
+
+
+ {Math.round(zoomLevel * 100)}%
+
+ >
+ ) : (
+
+ )}
+
+