Skip to content

Commit

Permalink
deploy: 82b085b
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-doty committed Sep 6, 2024
1 parent b6425bd commit e7d4947
Show file tree
Hide file tree
Showing 760 changed files with 885,538 additions and 3,295 deletions.
46 changes: 6 additions & 40 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,32 +96,8 @@

<body>

<!--<button id="compile">Compile</button>-->

<div id="top-container"></div>

<!--<script src="react_dnd_imports.js"></script>-->

<!--<script type="text/javascript">-->
<!-- const REACT_VERSION = React.version;-->

<!-- var ReactDnD_DndContext = window.ReactDnD.DndContext;-->
<!-- var ReactDnD_createDndContext = window.ReactDnD.createDndContext;-->
<!-- var ReactDnD_DndProvider = window.ReactDnD.DndProvider;-->
<!-- var ReactDnD_DragPreviewImage = window.ReactDnD.DragPreviewImage;-->
<!-- var ReactDnD_useDrag = window.ReactDnD.useDrag;-->
<!-- var ReactDnD_useDrop = window.ReactDnD.useDrop;-->
<!-- var ReactDnD_useDragLayer = window.ReactDnD.useDragLayer;-->
<!-- var ReactDnD_DragSource = window.ReactDnD.DragSource;-->
<!-- var ReactDnD_DropTarget = window.ReactDnD.DropTarget;-->
<!-- var ReactDnd_DragLayer = window.ReactDnD.DragLayer;-->
<!-- var ReactDnDHTML5Backend_NativeTypes = window.ReactDnDHTML5Backend.NativeTypes;-->
<!-- var ReactDnDHTML5Backend_getEmptyImage = window.ReactDnDHTML5Backend.getEmptyImage;-->
<!-- var ReactDnDHTML5Backend_default = window.ReactDnDHTML5Backend.default;-->


<!--</script>-->

<script type="text/javascript">

// for copying svg as png in Dart; some reason, Dart:HTML's navigator.clipboard.write is faulty
Expand All @@ -137,27 +113,19 @@
}
}

function setup_splits(show_editor) {
function setup_splits(show_oxview) {
setup_split_drag('side-pane', 'main-pane', 'side-main-separator');
if (show_editor) {
setup_split_drag('design-pane', 'editor-pane', 'design-editor-separator');
if (show_oxview) {
setup_split_drag('design-and-modes-buttons-container', 'oxview-pane', 'design-oxview-separator');
} else {
// need to remove style elements that specify width
clear_split_drag('design-pane');
clear_split_drag('design-and-modes-buttons-container');
}
}

// function react_uncontrolled_svg_pan_zoom() {
// return window.ReactSVGPanZoom.UncontrolledReactSVGPanZoom;
// }
//
// function autosizer() {
// return window.AutoSizer;
// }

var allow_pan = true;
var allow_zoom = true;


function set_allow_pan(allow) {
var prev_allow_pan = allow_pan;
Expand Down Expand Up @@ -400,7 +368,7 @@
zoom_speed = speed;

for (let svg of [side_view_svg_pan_zoom, main_view_svg_pan_zoom]) {
if(svg != undefined){
if (svg != undefined) {
svg.setZoomScaleSensitivity(speed);
}
}
Expand Down Expand Up @@ -514,8 +482,6 @@

</script>

<!--<script type="text/python" src="compile_script.py"></script>-->

<script src="external-libs/react-bootstrap.js"></script>

<script>
Expand Down
5,490 changes: 2,254 additions & 3,236 deletions main.dart.js

Large diffs are not rendered by default.

Binary file removed packages/scadnano/src/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions packages/scadnano/src/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.g.dart
#*.g 2.dart
/test_built_value.dart
.DS_Store
24 changes: 18 additions & 6 deletions scadnano-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ label + select {
overflow: auto;
}

#top-container {
#top-and-oxview {
display: flex;
height: 100%;
overflow: hidden;
}

#top-container,#oxview-frame {
display: flex;
height: 100%;
overflow: hidden;
Expand All @@ -63,15 +69,15 @@ label + select {
.draggable-separator {
width: 15px;
height: 100%;
background: lightgray;
background: gray;
position: relative;
cursor: col-resize;
cursor: move;
}

#design-and-modes-buttons-container {
display: flex;
height: 100%;
width: 100%;
/*width: 100%;*/
overflow: hidden;
}

Expand All @@ -83,12 +89,18 @@ label + select {
min-width: 0;
}

#design {
#design, #nonmenu-panes-container {
display: flex;
/*height: 100%;*/
height: 100%;
flex-grow: 1;
}

/* I thought this was necessary because clicking on oxview hides the menu,
but that's only when devtools is open. Seems to be fine in normal mode.*/
/*#menu {*/
/* height: 30px;*/
/*}*/

#side-pane {
/*width: 8%;*/
/*background: #eee;*/
Expand Down
24 changes: 11 additions & 13 deletions splitpane.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,38 @@ function setup_split_drag(left_pane_id, right_pane_id, separator_id) {
var leftPane = document.getElementById(left_pane_id);
var rightPane = document.getElementById(right_pane_id);
var paneSep = document.getElementById(separator_id);
var parent = leftPane.parentElement;
paneSep.sdrag(function (el, pageX, startX, pageY, startY, fix) {

fix.skipX = true;

if (pageX < window.innerWidth * leftLimit / 100) {
pageX = window.innerWidth * leftLimit / 100;
if (pageX < parent.offsetWidth * leftLimit / 100) {
pageX = parent.offsetWidth * leftLimit / 100;
fix.pageX = pageX;
}
if (pageX > window.innerWidth * rightLimit / 100) {
pageX = window.innerWidth * rightLimit / 100;
if (pageX > parent.offsetWidth * rightLimit / 100) {
pageX = parent.offsetWidth * rightLimit / 100;
fix.pageX = pageX;
}

var cur = pageX / window.innerWidth * 100;
var cur = pageX / parent.offsetWidth * 100;
if (cur < 0) {
cur = 0;
}
if (cur > window.innerWidth) {
cur = window.innerWidth;
if (cur > parent.offsetWidth) {
cur = parent.offsetWidth;
}

var right = (100-cur-1);
leftPane.style.width = cur + '%';
rightPane.style.width = right + '%';

var side_pane_width_key = _LOCAL_STORAGE_PREFIX + 'side_pane_width';
window.localStorage[side_pane_width_key] = leftPane.style.width;

var left_pane_width_key = _LOCAL_STORAGE_PREFIX + left_pane_id +'-width';
window.localStorage[left_pane_width_key] = leftPane.style.width;
}, null, 'horizontal');
}

function clear_split_drag(pane_id) {
var pane = document.getElementById(pane_id);
// delete pane.style;
pane.style = "";
pane.style.width = "100%";
delete pane.style;
}
Loading

0 comments on commit e7d4947

Please sign in to comment.