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

Address toggleActive() and showSublayers() functionality #4

Closed
dnseminara opened this issue Oct 4, 2016 · 1 comment
Closed

Address toggleActive() and showSublayers() functionality #4

dnseminara opened this issue Oct 4, 2016 · 1 comment
Assignees

Comments

@dnseminara
Copy link
Contributor

The crux of these CAS issues sort've percolate from having an additional, third tier of functionality. This ticket is more of an overarching notification, rather than an actual implementation of a suggestive fix.

Some starting points are here:

  • showSublayers() either needs to be added to sub-sublayers (ports) or account for that use case everytime that appears

    //models.js:608
    
    self.showSublayers = ko.observable(false);
  • This fires every time a mouse click happens on the body - but currently, there's no subLayer of a sub-sublayer and produces an error.

    //app.js:189
    
    $(document).on('click', 'body', function(event) {
        var activeLayer = app.viewModel.activeLayer();
        var elm = '.layer.open.dropdown';
        if (activeLayer && (activeLayer.showSublayers() || $(elm).length)) {
          app.viewModel.outsideSubLayer(event, elm);
        }
      });
  • Activation of port layers produces weird results with the activeLayer logic and is part of the reason that deactivation of these layers don't work. If a single CAS port has been activated, you'll see that you can't delete them. During the next go around, add two ports and put a debugger within toggleActive ~794. You'll see that activeLayer doesn't behave the same way for both CAS port layers. This may be helpful for ticket [8 hours] Fix Activation/Deactivation Logic #3

    //models.js:794 - in self.toggleActive()
    
    if (layer !== activeLayer && typeof activeLayer !== 'undefined') {
            // are these CAS/VTR layers?
@pollardld
Copy link
Member

pollardld commented Nov 4, 2016

added to model.js

line:794   typeof activeLayer.parentDirectory == 'Function'

line:801   typeof activeLayer.parentDirectory == 'Function'

added to app.js

line: 189   if (activeLayer && typeof activeLayer.showSublayers == 'function')

To fix errors. will push with other issue fixes

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

2 participants