src/symbol.js
// if hasInitialized is false then makeSymbol has not yet been called
if hasInitialized is false then makeSymbol has not yet been called
if hasInitialized is false then makeSymbol has not yet been called
if (hasInitialized) {
    if (!documentData) {
      documentData = getDocumentDataFromContext(context); 
    }
    const currentPage = documentData.currentPage();
    const symbolsPage = documentData.symbolsPageOrCreateIfNecessary();
    let left = 0;
    Object.keys(symbolsRegistry).forEach((key) => {
      const symbolMaster = symbolsRegistry[key];
      symbolMaster.frame.y = 0;
      symbolMaster.frame.x = left;
      left += symbolMaster.frame.width + 20;
      const newLayer = fromSJSONDictionary(symbolMaster);
      layers[symbolMaster.symbolID] = newLayer;
    });
    resetLayer(symbolsPage);
    renderLayers(Object.keys(layers).map(k => layers[k]), symbolsPage);
    documentData.setCurrentPage(currentPage);
  }
if ( hasInitialized ) { if ( ! documentData ) { documentData = getDocumentDataFromContext ( context ) ; } const currentPage = documentData . currentPage ( ) ; const symbolsPage = documentData . symbolsPageOrCreateIfNecessary ( ) ; let left = 0 ; Object . keys ( symbolsRegistry ) . forEach ( ( key ) => { const symbolMaster = symbolsRegistry [ key ] ; symbolMaster . frame . y = 0 ; symbolMaster . frame . x = left ; left += symbolMaster . frame . width + 20 ; const newLayer = fromSJSONDictionary ( symbolMaster ) ; layers [ symbolMaster . symbolID ] = newLayer ; } ) ; resetLayer ( symbolsPage ) ; renderLayers ( Object . keys ( layers ) . map ( k => layers [ k ] ) , symbolsPage ) ; documentData . setCurrentPage ( currentPage ) ; }
if hasInitialized is false then makeSymbol has not yet been called
if hasInitialized is false then makeSymbol has not yet been called
// eslint-disable-line // Clear out page layers to prepare for re-render