Open EdwinChang24 opened 1 year ago
Oh wow... is that by clicking in the small white space in the helix adjacent to the existing domain?
At any rate, this is definitely a bug and should just be prevented. Thanks for finding it!
I don't know how to reproduce this. If it can be reproduced, re-open the issue and describe in detail what steps are needed to create the design shown in the first comment above.
I'm able to reproduce this bug in the current dev
branch by drawing a domain, and then drawing another domain starting on one side of the first domain and ending on the other side to overlap the first domain. This was fixed in the original pull request (#860) but reintroduced in #883.
I'm able to reproduce this bug in the current
dev
branch by drawing a domain, and then drawing another domain starting on one side of the first domain and ending on the other side to overlap the first domain. This was fixed in the original pull request (#860) but reintroduced in #883.
Ah, I see it now! scadnano prevents dragging the cursor into the middle of the domain, but if you reach to the other side of it, it allows you to draw it.
Hmm, right now I'm not seeing how to fix the logic in a way that won't re-introduce the bug in #883, but maybe we can discuss in our next meeting
I removed the "closed in dev" because this behavior still appears on the dev server (https://scadnano.org/dev/) and when I run locally from the dev branch.
I'm a bit confused about the history here, I see some of the comments here were made after PR #860, but for some reason I thought we had fixed this issue again after that.
Looks like domains can be created like this:
When this happens, no error is immediately thrown, but when reloading the page, this message appears:
Click to show
``` ****************** * illegal design * ****************** The design has the following problem: two domains overlap on helix 1: Domain { helix=1, forward=true, start=0, end=8, deletions=[], insertions=[], is_first=true, is_last=true, is_scaffold=false, strand_id=strand-H1-0-forward, unused_fields={}, } and Domain { helix=1, forward=true, start=1, end=7, deletions=[], insertions=[], is_first=true, is_last=true, is_scaffold=false, strand_id=strand-H1-1-forward, unused_fields={}, } but have the same direction ********************************************************************************** * If you believe this is due to a bug in scadnano, please file a bug report at * * https://github.com/UC-Davis-molecular-computing/scadnano/issues * * Include this entire message in the email. * ********************************************************************************** stack trace: dart:sdk_internal 4850:11 throw_ package:scadnano/src/state/design.dart 1483:15 check_strands_overlap_legally package:scadnano/src/state/design.dart 1366:5 [_check_legal_design] package:scadnano/src/state/design.dart 120:11 new package:scadnano/src/state/design.dart 1303:12 from_json package:scadnano/src/state/design.dart 1254:19 from_json_str package:scadnano/src/reducers/load_dna_file_reducer.dart 25:29 load_dna_file_reducer$ package:scadnano/src/reducers/app_state_reducer.dart 21:12 app_state_reducer$ package:redux_dev_tools/src/state.dart 38:17 fromApp package:redux_dev_tools/src/reducer.dart 31:20 call package:redux/src/store.dart 235:28