- 
                Notifications
    You must be signed in to change notification settings 
- Fork 12k
Enable animation on inner nodes of the element and options #11173
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
          
     Open
      
      
            stockiNail
  wants to merge
  12
  commits into
  chartjs:master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
pepstock-org:pathAnimOpts
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from 9 commits
      Commits
    
    
            Show all changes
          
          
            12 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      73541b4
              
                Enable animation on inner nodes of the element and options
              
              
                stockiNail 78b00c0
              
                some improvements and test cases
              
              
                stockiNail ed9a07e
              
                size limit
              
              
                stockiNail ac7bb05
              
                add test case on properties consistency
              
              
                stockiNail f17489e
              
                improve use cases config
              
              
                stockiNail 6ec4029
              
                remove useless check
              
              
                stockiNail f814f8e
              
                improve performances
              
              
                stockiNail 9fd9908
              
                Merge remote-tracking branch 'origin/master' into pathAnimOpts
              
              
                stockiNail ec83acd
              
                Merge remote-tracking branch 'origin/master' into pathAnimOpts
              
              
                stockiNail 87b9297
              
                Update src/core/core.animations.js
              
              
                stockiNail 31442e1
              
                improve cycle
              
              
                stockiNail 42f31c4
              
                fixed multiple path options with the same root and test case
              
              
                stockiNail File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like each "path" prop would be managed multiple times if there are multiple "path" props?
I think most of the new helpers could be omitted(?):
Did I miss something?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kurkle I think the IF statement, you suggested, is wrong because the "prop" is not an item of "properties" animation configuration but one of the keys of the config object, therefore it will never have a dot.
The for cycle is on the config properties and not on the animation config one. That's why I used a map, reading the anim config, where the K is the fist part of the path (to check with the
prop) and the V the whole path (an object with prop and whole path as array).EDIT: I have merged your suggestion anyway because I didn't recall all logic of this PR... 4 months is to big period for my memory, getting old. 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Furthermore, I cannot use
resolveObjectKeyhelper because this function is returning the value of the key and not the object where the key belongs to and therefore I cannot reuse themanageItemfunction for both normal and path anim options, where the function needs the object with key.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kurkle I have improved a bit removing the for Each statemenet. Anyway forEach should be needed. Need to time to review. Apologize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kurkle now I recall why we need to scan the map but was wrong. Now I fixed.
The map has:
K = string = the first item of the path (i.e.
'font'if animation properties config has'font.size')V = array = the array of objects with the animation properties config
The V is an array because you can configure more than 1 anim prop as path (i.e.
['font.size', 'font.weight'])