Vertical scrollbars not appearing in workspace

639 views
Skip to first unread message

Paul Hemans

unread,
May 26, 2017, 9:13:44 AM5/26/17
to Blockly
My workspace does not have a vertical scrollbar, however the horizontal one is there. Everything else works fine and there are no errors in the console. It just makes it very difficult to get to content that is vertically off the screen.

Any suggestions?

Erik Pasternak

unread,
May 26, 2017, 4:06:10 PM5/26/17
to Blockly
Hi Paul,

From that description I don't have a clear idea what might be going wrong.

Just to check can you still scroll vertically by clicking and dragging the background? Is there an svg element with class blocklyScrollbarVertical in the elements pane? If so, is it invisible?

It might also help debug if you add a snippet of the code you're using to inject Blockly and the configuration for it.

Cheers,
Erik

Paul Hemans

unread,
May 26, 2017, 9:25:39 PM5/26/17
to Blockly
Thanks Erik,

This is the code for the initialization.

       var toolbox = document.getElementById("dbToolbox");

        var options = {
            toolbox: toolbox,
            collapse: true,
            comments: true,
            disable: true,
            maxBlocks: Infinity,
            trashcan: true,
            horizontalLayout: false,
            toolboxPosition: 'start',
            css: true,
            media: '../media/',
            rtl: false,
            scrollbars: true,
            sounds: true,
            oneBasedIndex: true
        };

        // Inject the workspace
        var workspace = Blockly.inject('blocklyDiv', options);

        // Load Workspace Blocks from XML to workspace.
        var workspaceBlocks = document.getElementById("dbWorkspace");

        Blockly.Xml.domToWorkspace(workspaceBlocks, workspace);

The contents of dbToolbox

<xml xmlns="http://www.w3.org/1999/xhtml" id="toolbox" style="display: none;">
  <category name="Database">
    <block type="db_build_database"></block>
  </category>
  <category name="Table">
    <block type="db_table"></block>
    <block type="db_access"></block>
    <block type="db_rule"></block>
    <block type="db_scheduled_rule"></block>
    <block type="day_month_schedule"></block>
  </category>
  <category name="Field">
      <block type="db_field"></block>
    <block type="db_access"></block>
    <block type="db_rule"></block>
  </category>
</xml>

The contents of dbWorkspace

<xml xmlns="http://www.w3.org/1999/xhtml" id="workspaceBlocks" style="display:none">
</xml>

Hope that makes sense.

Erik Pasternak

unread,
May 29, 2017, 1:51:44 PM5/29/17
to Blockly
Everything looks standard. Is your blocklyDiv overlapping with anything else or did any of the other debug steps find anything?

--
You received this message because you are subscribed to a topic in the Google Groups "Blockly" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/blockly/FzauAlVorx0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to blockly+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Erik Pasternak | Master of the House | epas...@google.com     
Reply all
Reply to author
Forward
0 new messages