zoukankan      html  css  js  c++  java
  • [2020-06-12]Data Label

                                                                                                     Record Of Code Review

    ---- Subject : Data Label

    ---- Spec: Data label is completed by overlay

    ---- Question:

    1、Set rules to change some options for data point, So how to better design code structure to adapt to TS version and C# version ?

    Currently , instead of cloning, jack uses the method of saving the change records of

    each data instance to improve performance, however there is a issue for C# , which

    is that C# is not only support the js option but also support object as the parameter to pass

    So , to solve this issue, refactors about current code are as following :

    ① C# supports strong types,so jack should change the any type to specific type like IDatalabelOption

    ② Create a new option:compose option to encapsulate internal option in DV and option in plugin

    ③ User should use queryInterface to get property

    ④ Aboout the C# , Robin and jack need to work together to define specific interface


    2、When does the condition format work?

    Before layout

    and After the loading, all models are ready

    Whether the property is allowed to be modified determines whether its influence will change on the runtime moudle chain

    Note: the type of object can not be changed

     

    ---- Code Rules:

    1. Option of plugin can not be any type, it should be a interface

    2. Change the life scope.

    3. About animation, try to raise.

    4. Don't load in constructor, use lazy load.

    5. When sets the prop in the class constructor, the prop is const.

    ---- Design rules:

    Standard interface as a base class, other classes can inherit from it , then they will have no conflict with each other


    ---- Remaining problems:

    About inheritance between options , It is inconvenient for user to implement irrelevant attributes if there are too many inheritance levels

     

     

     

     

     

     

     

     

     

  • 相关阅读:
    hdu
    如何在maven中的项目使用tomcat插件
    Intellij IDEA 像eclipse那样给maven添加依赖,且Intellij idea里在pom.xml里添加Maven依赖,本地仓库下拉列表显示包很少的血的经验
    DataTables warning: table id=costitemProject
    Navicat Premium Mac 12 破解
    mac显示隐藏的文件
    tomcat7下载地址
    mac同时安装jdk7和jdk8
    屏蔽datatable错误提示
    mac上配置java jdk环境
  • 原文地址:https://www.cnblogs.com/QQ-lala/p/13134176.html
Copyright © 2011-2022 走看看