Browse Source

KERNEL-13158: context跳过popup

es6
guy 2 years ago
parent
commit
4c54640fee
  1. 8
      examples/useContext.html

8
examples/useContext.html

@ -22,7 +22,7 @@
state: function () {
return {
expand: false,
cssScale: 2.0
cssScale: true
};
},
childContext: ["text", "cssScale"],
@ -44,7 +44,7 @@
var TempModel = BI.inherit(BI.Model, {
state: function () {
return {
cssScale: 1.0
cssScale: false
};
},
childContext: ["cssScale"],
@ -54,7 +54,7 @@
var oldFormat = BI.pixFormat;
BI.pixFormat = function (pix, border) {
var context = BI.useContext("cssScale");
if (!context || context.model.cssScale <=1) {
if (!context || context.model.cssScale === false) {
return oldFormat.apply(this, arguments);
}
if (!BI.isNumber(pix)) {
@ -69,7 +69,7 @@
var oldPix = BI.toPix;
BI.toPix = function (pix, border) {
var context = BI.useContext("cssScale");
if (!context || context.model.cssScale <=1) {
if (!context || context.model.cssScale === false) {
return oldFormat.apply(this, arguments);
}
if (!BI.isNumber(pix)) {

Loading…
Cancel
Save