<commit_before>Visualization = require './visualization.js'

class VisualizationStory extends Visualization

  # Override onSync method to set Visualization Canvas offset x & use render(false)
  onSync: =>
    # Setup visualization parameters
    @parameters = $.parseJSON @visualization.get('parameters')
    @setupParameters()
    # Setup VisualizationCanvas
    @visualizationCanvas.setup @nodes, @relations, @parameters
    $('.visualization-graph-component').css 'margin-left', -230 # translate left half the width of Story Info panel
    @visualizationCanvas.render()
    # Setup Visualization Events
    @bindVisualizationEvents()
    # Trigger synced event for Stories
    Backbone.trigger 'visualization.synced'

  # Setup a chapter nodes & relations in Visualization Canvas
  showChapter: (nodes, relations) ->
    # Update VisualizationCanvas data based on chapter nodes & relations
    @visualizationCanvas.updateData nodes, relations
    @visualizationCanvas.redraw()

module.exports = VisualizationStory<commit_msg>Fix menu canvas & navigation render in visualization-story<commit_after>Visualization = require './visualization.js'

class VisualizationStory extends Visualization

  # Override onSync method to set Visualization Canvas offset x & use render(false)
  onSync: =>
    # Setup visualization parameters
    @parameters = $.parseJSON @visualization.get('parameters')
    @setupParameters()
    # Setup VisualizationCanvas
    @visualizationCanvas.setup @nodes, @relations, @parameters
    $('.visualization-graph-component').css 'margin-left', -230 # translate left half the width of Story Info panel
    @visualizationCanvas.render()
    @visualizationNavigation.render()
    @visualizationActions.render @parameters
    # Setup Visualization Events
    @bindVisualizationEvents()
    # Trigger synced event for Stories
    Backbone.trigger 'visualization.synced'

  # Setup a chapter nodes & relations in Visualization Canvas
  showChapter: (nodes, relations) ->
    # Update VisualizationCanvas data based on chapter nodes & relations
    @visualizationCanvas.updateData nodes, relations
    @visualizationCanvas.redraw()

module.exports = VisualizationStory
{'fraction_non_alphanumeric': 0.0818847209515096, 'fraction_numerical': 0.0027447392497712718, 'mean_word_length': 4.63659793814433, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5896351', 'n_tokens_mistral': 570, 'n_tokens_neox': 532, 'n_words': 170}