Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Basketball/football/swimming/boxing pause button #13

Open
crosborn opened this issue Apr 11, 2017 · 2 comments
Open

Fix: Basketball/football/swimming/boxing pause button #13

crosborn opened this issue Apr 11, 2017 · 2 comments

Comments

@crosborn
Copy link

Fix: pause button needs to change between pause/play symbols depending on whether the timer is running

@joshhodgson
Copy link
Member

no

The stopwatch needs a rewrite to do this. It'll have to wait until after Roses so we have enough time to test

@peskdale
Copy link
Collaborator

peskdale commented Jun 20, 2017

I implemented this for our Futsal fork using the following:

public/js/dashboard.js

        socket.on("clock:tick", function (msg) {
            $scope.clock = msg;
            if (msg == '00:00') {
                $scope.[sport].clockPause = true;
            }
        });

        $scope.pauseClock = function() {
            socket.emit("clock:pause");
            $scope.[sport].clockPause = !$scope.[sport].clockPause;
        };

public/admin/templates/[sport].tmpl.html

<div class="ui icon blue button" ng-click="pauseClock()">
           <i class="play icon" ng-show="![sport].clockpause"></i>
           <i class="pause icon" ng-show="[sport].clockpause"></i>
</div>

Crude, but works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants