Skip to content

Commit

Permalink
Rupato/509/fix--for-blockly-alignment (#9460)
Browse files Browse the repository at this point in the history
* fix: merge latest

* fix: trigger circle ci

* fix: removed unused icons

* fix: reverted icon file changes

* fix: reverted icon file changes
  • Loading branch information
rupato-deriv committed Sep 7, 2023
1 parent ac29aba commit fda5b53
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
7 changes: 0 additions & 7 deletions packages/bot-skeleton/src/scratch/hooks/block_svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,6 @@ Blockly.BlockSvg.prototype.setCollapsed = function (collapsed) {
this.setErrorHighlighted(collapsed && this.hasErrorHighlightedDescendant());
};

export const blocksCoordinate = () => {
const during_purchase = Blockly.derivWorkspace?.getCanvas().children[1];
const after_purchase = Blockly.derivWorkspace?.getCanvas().children[2];
during_purchase?.setAttribute('transform', 'translate(720,0)');
after_purchase?.setAttribute('transform', 'translate(720,248)');
};

/**
* @deriv/bot: Add check for workspace.getCanvas() before appendChild() is called.
*/
Expand Down
1 change: 0 additions & 1 deletion packages/bot-skeleton/src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ export { onWorkspaceResize } from './workspace';
export { getSavedWorkspaces, saveWorkspaceToRecent, removeExistingWorkspace } from './local-storage';
export { timeSince } from './date-time-helper';
export { setColors } from '../scratch/hooks/colours';
export { blocksCoordinate } from '../scratch/hooks/block_svg';
export { initErrorHandlingListener, removeErrorHandlingEventListener, handleError } from './error-handling';
4 changes: 2 additions & 2 deletions packages/bot-web-ui/src/stores/dashboard-store.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { action, computed, makeObservable, observable, reaction } from 'mobx';
import { blocksCoordinate, setColors } from '@deriv/bot-skeleton';
import { setColors } from '@deriv/bot-skeleton';
import { isMobile } from '@deriv/shared';
import { clearInjectionDiv } from 'Constants/load-modal';
import { setTourSettings, tour_type, TTourType } from '../components/dashboard/joyride-config';
Expand Down Expand Up @@ -237,7 +237,7 @@ export default class DashboardStore implements IDashboardStore {
this.setBotBuilderTourState(false);
}
if (this.active_tab === 1) {
blocksCoordinate();
Blockly.derivWorkspace?.cleanUp();
}
};

Expand Down

0 comments on commit fda5b53

Please sign in to comment.