phetsims / paper-land

Build and explore multimodal web interactives with pieces of paper!
https://phetsims.github.io/paper-land/
MIT License
10 stars 1 forks source link

Custom code blocks do not have updated variable references when copied #195

Closed jessegreenberg closed 6 months ago

jessegreenberg commented 6 months ago

When a program is copied, component code correctly updates variable references. But the custom code does not. I expected it to after #187. That issue took care of component renaming, but I still see this bit in the copy implementation:


  /**
   * Copies the custom code from the provided program to this program. For now, we just copy every string and
   * leave it up to the user to update variable name references.
   */
  copyCustomCodeFromOther( programJSON ) {
    this.customCodeContainer.copyFromOther( programJSON.customCodeContainer );
  }

Lets handle this part too.

jessegreenberg commented 6 months ago

This change was made directly to the main branch. Closing.