MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-SimpleTides - (Replaced by MMM-SORT)

    Scheduled Pinned Locked Moved Education
    6 Posts 2 Posters 3.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Mykle1M Offline
      Mykle1 Project Sponsor Module Developer
      last edited by

      Thanks to @yawns for the green light! :^)

      Create a working config
      How to add modules

      1 Reply Last reply Reply Quote 1
      • Mykle1M Offline
        Mykle1 Project Sponsor Module Developer
        last edited by Mykle1

        Ok, so I went a bit mental. ;^)

        I couldn’t decide if I wanted the tides rotating or static and my pitiful programming skills don’t include making a module that does both. So, I made MMM-StaticTIdes. It’s basically a rewrite of MMM-SimpleTides with some formatting changes and less info to keep screen real estate to a minimum. However, a quick glance gives you the next 8 tides, whereas MMM-SimpleTides gives a full week of tides and other information in rotation.

        0_1507423807703_1.JPG 0_1507423827574_2.JPG

        Create a working config
        How to add modules

        yawnsY 1 Reply Last reply Reply Quote 0
        • yawnsY Offline
          yawns Moderator @Mykle1
          last edited by

          @Mykle1 said in MMM-SimpleTides:

          my pitiful programming skills don’t include making a module that does both

          Simplest way would be this:
          Add a config attribute

          {
          	disabled: false,
          	module: "MMM-SimpleTides",
          	position: "top_left",
          	config: {
          ...
          		outputLayout: "simple"
          	}
          },
          

          and in getDom: function() { after preparing/modifying your data you add a simple if/else clause.

          if (this.config.outputLayout == "simple") {
          // print the data as in SimpleTides
          } else {
          // print the data as in StaticTides
          }
          
          Mykle1M 2 Replies Last reply Reply Quote 1
          • Mykle1M Offline
            Mykle1 Project Sponsor Module Developer @yawns
            last edited by

            @yawns said in MMM-SimpleTides:

            Simplest way would be this:

            Oh snap! Of course! Thanks yawns!

            I will give that a shot today. :^)

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 1
            • Mykle1M Offline
              Mykle1 Project Sponsor Module Developer @yawns
              last edited by Mykle1

              @yawns said in MMM-SimpleTides:

              and in getDom: function() { after preparing/modifying your data you add a simple if/else clause.

              I gave it the old college try, and I almost got there on my own. Two simple mistakes fixed and a Carousel() addition all made by @cowboysdude got me up and running. Thanks bro!

              MMM-SORT

              Create a working config
              How to add modules

              1 Reply Last reply Reply Quote 2
              • 1 / 1
              • First post
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy