phetsims / resistance-in-a-wire

"Resistance in a Wire" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/resistance-in-a-wire
GNU General Public License v3.0
1 stars 4 forks source link

Should RichText or something else be used for <sup> here? #93

Closed zepumph closed 7 years ago

zepumph commented 7 years ago

Since I'm in this sim right now anyways, should I implement this instead with RichText. @jonathanolson could you provide some guidance about if it's worth it/difficult. I would be republishing this mainly for phet-io, but it would probably be rereleased on the main site too. How would this effect the current translations (which are just translating the cmString? See RIAW/ControlPanel.js for this code snippet.

    var areaSlider = new SliderUnit(
      model.areaProperty,
      ResistanceInAWireConstants.AREA_RANGE,
      areaSymbolString,
      areaString,
      cmString + '<sup>2</sup>',
      tandem.createTandem( 'areaSlider' ),
      {
        keyboardStep: 1.0, // cm^2
        shiftKeyboardStep: 0.01 // cm^2
      }
    );
zepumph commented 7 years ago

Sorry, I misread the code, it is being used right now.

zepumph commented 7 years ago

Closing