Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat code #38

Merged
merged 1 commit into from
Jul 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Reformat code
  • Loading branch information
saich08 committed Jul 24, 2021
commit 84f121f48f95cff7e9199e12228d9bcd71435c45
2 changes: 1 addition & 1 deletion src/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {

import {
BlochSphereEventsNamespace
} from "./events/blochsphere.js";
} from "./events/bloch_sphere.js";

import {
ToolboxEventsNamespace
Expand Down
4 changes: 4 additions & 0 deletions src/events/blochsphere.js → src/events/bloch_sphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ var BlochSphereEventsNamespace = {
blochSphereOperation: function() {
if (GlobalContext.blochSphereOperation.inProgress) {
if (GlobalContext.blochSphereOperation.rotation == 0) {
// set inProgress flag to false
GlobalContext.blochSphereOperation.inProgress = false;

// get blochSphere state
Expand Down Expand Up @@ -67,10 +68,13 @@ var BlochSphereEventsNamespace = {
},

startBlochSphereOperation: function(gate) {
// disable quantum gates
ToolboxEventsNamespace.disableQuantumGates();

// set inProgress flag to true
GlobalContext.blochSphereOperation.inProgress = true;

// set rotationAxis and rotation
GlobalContext.blochSphereOperation.rotationAxis = gate.rotationAxis;
GlobalContext.blochSphereOperation.rotation = gate.rotation
}
Expand Down
2 changes: 1 addition & 1 deletion src/events/toolbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {

import {
BlochSphereEventsNamespace
} from "./blochsphere.js";
} from "./bloch_sphere.js";

import {
NavbarEventsNamespace
Expand Down