Hi,
and added a transparent div element on top of the workspace.
However, the scroll is not working (mouse wheel scroll, the scrolling through scroll bar still works). Here is the relevant code -
Html -
<div id="blocklyDiv-readOnly" style="height: 100%; width: 100%;"></div>
JS -
blocklyReadOnlyWorkspace = Blockly.inject(blocklyDivId + "-readOnly", {
toolbox: blocklyNamespace.Constants.EmptyToolbox,
scrollbars: true,
move: {
scrollbars: {
horizontal: true,
vertical: true
},
drag: true,
wheel: true
},
//initialising the theme to customise the block colours and block styles
theme: Blockly.Themes.Majestic
});
CSS -
#blocklyDiv-readOnly:before {
content: '';
height: 98%;
width: 98%;
display: block;
position: absolute;
background-color: transparent;
z-index: 99;
}
Any help to make the scrolling functional would be appreciated.
Regards,
Harsh